From 7a21a9032e56dd82c76ebdf98da891f66a84fe2c Mon Sep 17 00:00:00 2001 From: 3D-I Date: Mon, 11 Oct 2021 04:04:09 +0200 Subject: [PATCH] [ticket/16888] Add the list of allowed files in the attachment tab PHPBB3-16888 --- phpBB/includes/functions_posting.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index d3eb61b3e4..eaec554b94 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -813,13 +813,18 @@ function posting_gen_inline_attachments(&$attachment_data) } /** -* Generate inline attachment entry -*/ -function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true, $forum_id = false) + * Generate inline attachment entry + * + * @param array $attachment_data The attachment data + * @param string $filename_data The filename data (filecomment) + * @param bool $show_attach_box Whether to show the attach box + * @param mixed $forum_id The forum id to check or false if private message + * @return int + */ +function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true, $forum_id) { 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 != false ?: (int) $forum_id; $allowed_attachments = array_keys($cache->obtain_attach_extensions($forum_id)['_allowed_']);