From c5814ddfaa60a643c4f870a12cdb68193b47665a Mon Sep 17 00:00:00 2001 From: 3D-I Date: Mon, 11 Oct 2021 04:24:11 +0200 Subject: [PATCH] [ticket/16888] Add the list of allowed files in the attachment tab PHPBB3-16888 --- phpBB/includes/functions_posting.php | 4 ++-- phpBB/includes/ucp/ucp_pm_compose.php | 2 +- phpBB/posting.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 15f0279c05..a65851ccd8 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -817,11 +817,11 @@ function posting_gen_inline_attachments(&$attachment_data) * * @param array $attachment_data The attachment data * @param string $filename_data The filename data (filecomment) - * @param mixed $forum_id The forum id to check or false if private message * @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, $forum_id, $show_attach_box = true) +function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true, $forum_id = false) { global $template, $cache, $config, $phpbb_root_path, $phpEx, $user, $phpbb_dispatcher; diff --git a/phpBB/includes/ucp/ucp_pm_compose.php b/phpBB/includes/ucp/ucp_pm_compose.php index c601e058cf..7cb4c85916 100644 --- a/phpBB/includes/ucp/ucp_pm_compose.php +++ b/phpBB/includes/ucp/ucp_pm_compose.php @@ -1390,7 +1390,7 @@ function compose_pm($id, $mode, $action, $user_folders = array()) } // Attachment entry - posting_gen_attachment_entry($attachment_data, $filename_data, false, $allowed); + posting_gen_attachment_entry($attachment_data, $filename_data, $allowed); // Message History if ($action == 'reply' || $action == 'quote' || $action == 'forward') diff --git a/phpBB/posting.php b/phpBB/posting.php index 34f93ef08f..bc3e28ca43 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -2078,7 +2078,7 @@ if ($allowed) } // Attachment entry -posting_gen_attachment_entry($attachment_data, $filename_data, $forum_id, $allowed); +posting_gen_attachment_entry($attachment_data, $filename_data, $allowed, $forum_id); // Output page ... page_header($page_title);