mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-29 02:29:21 +02:00
[ticket/16888] Add the list of allowed files in the attachment tab
PHPBB3-16888
This commit is contained in:
parent
b29c0ca153
commit
1619014120
@ -815,13 +815,12 @@ function posting_gen_inline_attachments(&$attachment_data)
|
||||
/**
|
||||
* Generate inline attachment entry
|
||||
*/
|
||||
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true)
|
||||
function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true, $forum_id = false)
|
||||
{
|
||||
global $template, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
|
||||
global $cache, $request;
|
||||
global $template, $cache, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher;
|
||||
|
||||
// $forum_id when FALSE check for PMs if INT then check for forum id (topics|posts)
|
||||
$forum_id = $request->variable('f', 0) ?: false;
|
||||
$forum_id != false ?: (int) $forum_id;
|
||||
$allowed_attachments = array_keys($cache->obtain_attach_extensions($forum_id)['_allowed_']);
|
||||
|
||||
// Some default template variables
|
||||
|
@ -1390,7 +1390,7 @@ function compose_pm($id, $mode, $action, $user_folders = array())
|
||||
}
|
||||
|
||||
// Attachment entry
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed, false);
|
||||
|
||||
// Message History
|
||||
if ($action == 'reply' || $action == 'quote' || $action == 'forward')
|
||||
|
@ -2078,7 +2078,7 @@ if ($allowed)
|
||||
}
|
||||
|
||||
// Attachment entry
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed);
|
||||
posting_gen_attachment_entry($attachment_data, $filename_data, $allowed, $forum_id);
|
||||
|
||||
// Output page ...
|
||||
page_header($page_title);
|
||||
|
Loading…
x
Reference in New Issue
Block a user