aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-08-23 16:36:39 +0200
committerMarc Alexander <admin@m-a-styles.de>2014-08-23 16:36:39 +0200
commite5e45f860b798c955f1817001f07aabcbccbabcf (patch)
treead24053bcae50549245054ac8b75e4965a810d3c /phpBB/viewtopic.php
parent752c73193e04f7eb22b3b90ad746a6b277e59272 (diff)
downloadforums-e5e45f860b798c955f1817001f07aabcbccbabcf.tar
forums-e5e45f860b798c955f1817001f07aabcbccbabcf.tar.gz
forums-e5e45f860b798c955f1817001f07aabcbccbabcf.tar.bz2
forums-e5e45f860b798c955f1817001f07aabcbccbabcf.tar.xz
forums-e5e45f860b798c955f1817001f07aabcbccbabcf.zip
[ticket/12966] Sort by post_time and post_id where applicable
This change was not applied to the search as this would require a larger rewrite of the search methods. PHPBB3-12966
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index dfee8fd2f7..3d1bce1ccc 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -94,7 +94,7 @@ if ($view && !$post_id)
AND " . $phpbb_content_visibility->get_visibility_sql('post', $forum_id) . "
AND post_time > $topic_last_read
AND forum_id = $forum_id
- ORDER BY post_time ASC";
+ ORDER BY post_time ASC, post_id ASC";
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);
@@ -146,7 +146,7 @@ if ($view && !$post_id)
AND topic_moved_id = 0
AND topic_last_post_time $sql_condition {$row['topic_last_post_time']}
AND " . $phpbb_content_visibility->get_visibility_sql('topic', $row['forum_id']) . "
- ORDER BY topic_last_post_time $sql_ordering";
+ ORDER BY topic_last_post_time $sql_ordering, topic_last_post_id $sql_ordering";
$result = $db->sql_query_limit($sql, 1);
$row = $db->sql_fetchrow($result);
$db->sql_freeresult($result);