From 39676d513e653132916b9c0cf6c9cc6ee5ebe96a Mon Sep 17 00:00:00 2001 From: Fyorl Date: Tue, 14 Aug 2012 13:19:56 +0100 Subject: [feature/attach-dl] Added multiple attachment downloads to PMs PHPBB3-11042 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index c55e8850a6..16fa7d630e 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -257,6 +257,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) 'U_PM_ACTION' => $url . '&mode=compose&f=' . $folder_id . '&p=' . $message_row['msg_id'], 'S_HAS_ATTACHMENTS' => (sizeof($attachments)) ? true : false, + 'S_HAS_MULTIPLE_ATTACHMENTS' => (sizeof($attachments) > 1), 'S_DISPLAY_NOTICE' => $display_notice && $message_row['message_attachment'], 'S_AUTHOR_DELETED' => ($author_id == ANONYMOUS) ? true : false, 'S_SPECIAL_FOLDER' => in_array($folder_id, array(PRIVMSGS_NO_BOX, PRIVMSGS_OUTBOX)), @@ -282,6 +283,12 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // Display not already displayed Attachments for this post, we already parsed them. ;) if (isset($attachments) && sizeof($attachments)) { + $methods = phpbb_gen_download_links('post_id', $msg_id, $phpbb_root_path, $phpEx); + foreach ($methods as $method) + { + $template->assign_block_vars('dl_method', $method); + } + foreach ($attachments as $attachment) { $template->assign_block_vars('attachment', array( -- cgit v1.2.1 From 53aadd60a66c813db90aa1d54e649384679f2614 Mon Sep 17 00:00:00 2001 From: Fyorl Date: Fri, 17 Aug 2012 16:16:02 +0100 Subject: [feature/attach-dl] Renamed $post_id to $post_msg_id PHPBB3-11042 --- phpBB/includes/ucp/ucp_pm_viewmessage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/includes/ucp') diff --git a/phpBB/includes/ucp/ucp_pm_viewmessage.php b/phpBB/includes/ucp/ucp_pm_viewmessage.php index 16fa7d630e..27111f9c9a 100644 --- a/phpBB/includes/ucp/ucp_pm_viewmessage.php +++ b/phpBB/includes/ucp/ucp_pm_viewmessage.php @@ -283,7 +283,7 @@ function view_message($id, $mode, $folder_id, $msg_id, $folder, $message_row) // Display not already displayed Attachments for this post, we already parsed them. ;) if (isset($attachments) && sizeof($attachments)) { - $methods = phpbb_gen_download_links('post_id', $msg_id, $phpbb_root_path, $phpEx); + $methods = phpbb_gen_download_links('post_msg_id', $msg_id, $phpbb_root_path, $phpEx); foreach ($methods as $method) { $template->assign_block_vars('dl_method', $method); -- cgit v1.2.1