aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-08-26 18:56:09 +0200
committerAndreas Fischer <bantu@phpbb.com>2012-08-26 18:56:09 +0200
commitd0ce637251da211b2e969f7a173d3bde97b0894b (patch)
treefcb6c80b5b1c7c21d212bd5f51b7eb93d71cc092 /phpBB/viewtopic.php
parent18039cfa6af73d6582145023b6a3e67788d7a948 (diff)
parente1a4aa3ea255874660d31e13c0b4cadc8993ef4f (diff)
downloadforums-d0ce637251da211b2e969f7a173d3bde97b0894b.tar
forums-d0ce637251da211b2e969f7a173d3bde97b0894b.tar.gz
forums-d0ce637251da211b2e969f7a173d3bde97b0894b.tar.bz2
forums-d0ce637251da211b2e969f7a173d3bde97b0894b.tar.xz
forums-d0ce637251da211b2e969f7a173d3bde97b0894b.zip
Merge remote-tracking branch 'Fyorl/feature/attach-dl' into develop
* Fyorl/feature/attach-dl: (75 commits) [feature/attach-dl] Removed the use of some abbreviations [feature/attach-dl] Changed $files_added checks [feature/attach-dl] Renamed $post_id to $post_msg_id [feature/attach-dl] Fixed a comment [feature/attach-dl] Optimised an sql query [feature/attach-dl] Fixed the logic in an sql statement [feature/attch-dl] $forum_id cast to int [feature/attach-dl] Fixed $file_added to $files_added [feature/attach-dl] Moved definition of $archive_name [feature/attach-dl] Swapped the order of an if statement [feature/attach-dl] Cast variables to int [feature/attach-dl] Added $archive_path [feature/attach-dl] Used COMMA_SEPARATOR instead of actual comma [feature/attach-dl] Renamed $count to $files_added [feature/attach-dl] Removed sprintf() use [feature/attach-dl] Removed need for array_keys() [feature/attach-dl] Added multiple attachment downloads to PMs [feature/attach-dl] Removed reliance on current($row) [feature/attach-dl] Renamed to phpbb_download_handle_forum_auth [feature/attach-dl] Moved PM authentication handling into own function ...
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 3dd7d8a863..3fde5b5e03 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1352,6 +1352,16 @@ if (sizeof($attach_list))
}
}
+$template->assign_vars(array(
+ 'S_HAS_ATTACHMENTS' => !empty($attachments),
+));
+
+$methods = phpbb_gen_download_links('topic_id', $topic_id, $phpbb_root_path, $phpEx);
+foreach ($methods as $method)
+{
+ $template->assign_block_vars('dl_method', $method);
+}
+
// Instantiate BBCode if need be
if ($bbcode_bitfield !== '')
{
@@ -1594,6 +1604,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'POSTER_ID' => $poster_id,
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false,
+ 'S_MULTIPLE_ATTACHMENTS' => !empty($attachments[$row['post_id']]) && sizeof($attachments[$row['post_id']]) > 1,
'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true,
'S_POST_REPORTED' => ($row['post_reported'] && $auth->acl_get('m_report', $forum_id)) ? true : false,
'S_DISPLAY_NOTICE' => $display_notice && $row['post_attachment'],
@@ -1647,6 +1658,12 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
'DISPLAY_ATTACHMENT' => $attachment)
);
}
+
+ $methods = phpbb_gen_download_links('post_msg_id', $row['post_id'], $phpbb_root_path, $phpEx);
+ foreach ($methods as $method)
+ {
+ $template->assign_block_vars('postrow.dl_method', $method);
+ }
}
$prev_post_id = $row['post_id'];