1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

[ticket/16888] Add the list of allowed files in the attachment tab

PHPBB3-16888
This commit is contained in:
3D-I
2021-10-11 02:48:34 +02:00
parent b29c0ca153
commit 1619014120
3 changed files with 5 additions and 6 deletions

View File

@@ -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