1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

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
This commit is contained in:
Meik Sievertsen
2008-10-06 13:53:18 +00:00
parent 80b9fd04e0
commit b4d2641a59
3 changed files with 16 additions and 22 deletions

View File

@@ -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);
}