From f1772ce7e5b2d75ced8379b5ed8a644af248532f Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 6 Mar 2016 10:40:42 +0100 Subject: [PATCH] [ticket/14437] Preserve attachment ID order by ordering by attach_id PHPBB3-14437 --- phpBB/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index fcc44abc33..c0041b0993 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1452,7 +1452,7 @@ if (sizeof($attach_list)) FROM ' . ATTACHMENTS_TABLE . ' WHERE ' . $db->sql_in_set('post_msg_id', $attach_list) . ' AND in_message = 0 - ORDER BY filetime DESC, post_msg_id ASC'; + ORDER BY attach_id DESC, post_msg_id ASC'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result))