aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-10-06 13:53:18 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-10-06 13:53:18 +0000
commitb4d2641a595dcd25b52118793031e78f0e3b7da7 (patch)
treedda3d40bb9b27070b4aed874f521a6e1bd9daba6 /phpBB/includes/functions_posting.php
parent80b9fd04e06a8d48f84e493ca53fb73b4f4fa83d (diff)
downloadforums-b4d2641a595dcd25b52118793031e78f0e3b7da7.tar
forums-b4d2641a595dcd25b52118793031e78f0e3b7da7.tar.gz
forums-b4d2641a595dcd25b52118793031e78f0e3b7da7.tar.bz2
forums-b4d2641a595dcd25b52118793031e78f0e3b7da7.tar.xz
forums-b4d2641a595dcd25b52118793031e78f0e3b7da7.zip
Separate display of posted attachments in posting screen and switch for template to indicate adding attachments are allowed. Related to Bug #13871
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8976 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php21
1 files changed, 8 insertions, 13 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 4ce5fbd133..eaa3ab0cd3 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -765,20 +765,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, $phpbb_root_path, $phpEx, $user;
+ global $template, $config, $phpbb_root_path, $phpEx, $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);
@@ -808,11 +808,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);
}