From ab9ec8064acb25d09d6d0edb93ecbe3b59541010 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 21 Nov 2006 18:15:53 +0000 Subject: - fixing a bunch of bugs - moved the install trigger error to sessions and also disabled it for those having DEBUG_EXTRA enabled. i hope not having introduced too many new bugs. git-svn-id: file:///svn/phpbb/trunk@6628 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/includes/functions_posting.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/includes/functions_posting.php') diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index aec4a3417f..37d8c0cd2b 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -692,7 +692,7 @@ 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) { global $template, $config, $phpbb_root_path, $phpEx, $user; @@ -706,8 +706,10 @@ function posting_gen_attachment_entry(&$attachment_data, &$filename_data) 'S_HAS_ATTACHMENTS' => true) ); - $count = 0; - foreach ($attachment_data as $attach_row) + // We display the posted attachments within the desired order. + ($config['display_order']) ? krsort($attachment_data) : ksort($attachment_data); + + foreach ($attachment_data as $count => $attach_row) { $hidden = ''; $attach_row['real_filename'] = basename($attach_row['real_filename']); @@ -729,8 +731,6 @@ function posting_gen_attachment_entry(&$attachment_data, &$filename_data) 'U_VIEW_ATTACHMENT' => $download_link, 'S_HIDDEN' => $hidden) ); - - $count++; } } -- cgit v1.2.1