diff options
| author | Meik Sievertsen <acydburn@phpbb.com> | 2008-10-08 12:51:43 +0000 |
|---|---|---|
| committer | Meik Sievertsen <acydburn@phpbb.com> | 2008-10-08 12:51:43 +0000 |
| commit | 9d9d61b1a209098dc30d0905d88575a4f84cb197 (patch) | |
| tree | eeed66fe2ff92a246d498defd1863996737e4d59 /phpBB/includes/functions_posting.php | |
| parent | 89f1b88fe15da4fc8c25f456ef594f20a5357476 (diff) | |
| download | forums-9d9d61b1a209098dc30d0905d88575a4f84cb197.tar forums-9d9d61b1a209098dc30d0905d88575a4f84cb197.tar.gz forums-9d9d61b1a209098dc30d0905d88575a4f84cb197.tar.bz2 forums-9d9d61b1a209098dc30d0905d88575a4f84cb197.tar.xz forums-9d9d61b1a209098dc30d0905d88575a4f84cb197.zip | |
Merge revisions:
r8974, r8975, r8976, r8977, r8978, r8979
git-svn-id: file:///svn/phpbb/trunk@8980 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
| -rw-r--r-- | phpBB/includes/functions_posting.php | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 85f2089628..ad24758aee 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -763,20 +763,20 @@ function posting_gen_inline_attachments(&$attachment_data) /** * Generate inline attachment entry */ -function posting_gen_attachment_entry($attachment_data, &$filename_data) +function posting_gen_attachment_entry($attachment_data, &$filename_data, $show_attach_box = true) { - global $template, $config, $user; + global $template, $config, $user, $auth; + // Some default template variables $template->assign_vars(array( - 'S_SHOW_ATTACH_BOX' => true) - ); + 'S_SHOW_ATTACH_BOX' => $show_attach_box, + 'S_HAS_ATTACHMENTS' => sizeof($attachment_data), + 'FILESIZE' => $config['max_filesize'], + 'FILE_COMMENT' => (isset($filename_data['filecomment'])) ? $filename_data['filecomment'] : '', + )); if (sizeof($attachment_data)) { - $template->assign_vars(array( - 'S_HAS_ATTACHMENTS' => true) - ); - // We display the posted attachments within the desired order. ($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data); @@ -806,11 +806,6 @@ function posting_gen_attachment_entry($attachment_data, &$filename_data) } } - $template->assign_vars(array( - 'FILE_COMMENT' => $filename_data['filecomment'], - 'FILESIZE' => $config['max_filesize']) - ); - return sizeof($attachment_data); } |
