diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-02-21 14:10:45 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-02-21 14:10:45 +0100 |
commit | c5c2f7f7d0f85c8a95271a5abeed0cc4a2bf2678 (patch) | |
tree | 49fa23f776779136a18353a8c10a9be3397a3d74 /phpBB/includes | |
parent | 6e4ab6509b38f03daa2fb2af30df61423b126bdf (diff) | |
download | forums-c5c2f7f7d0f85c8a95271a5abeed0cc4a2bf2678.tar forums-c5c2f7f7d0f85c8a95271a5abeed0cc4a2bf2678.tar.gz forums-c5c2f7f7d0f85c8a95271a5abeed0cc4a2bf2678.tar.bz2 forums-c5c2f7f7d0f85c8a95271a5abeed0cc4a2bf2678.tar.xz forums-c5c2f7f7d0f85c8a95271a5abeed0cc4a2bf2678.zip |
[ticket/14437] Correctly assume index from attachment display order
PHPBB3-14437
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions_content.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 6f861b8607..fe4e977ff2 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -975,7 +975,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, } // Sort correctly - if ($config['display_order']) + if (!$config['display_order']) { // Ascending sort krsort($attachments); @@ -1233,7 +1233,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count, foreach ($matches[0] as $num => $capture) { // Flip index if we are displaying the reverse way - $index = ($config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num]; + $index = (!$config['display_order']) ? ($tpl_size-($matches[1][$num] + 1)) : $matches[1][$num]; $replace['from'][] = $matches[0][$num]; $replace['to'][] = (isset($attachments[$index])) ? $attachments[$index] : sprintf($user->lang['MISSING_INLINE_ATTACHMENT'], $matches[2][array_search($index, $matches[1])]); |