1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[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
This commit is contained in:
Marc Alexander
2014-08-23 16:36:39 +02:00
parent 752c73193e
commit e5e45f860b
15 changed files with 50 additions and 32 deletions

View File

@@ -94,7 +94,7 @@ class forum extends \phpbb\feed\post_base
WHERE forum_id = ' . $this->forum_id . '
AND topic_moved_id = 0
AND ' . $this->content_visibility->get_visibility_sql('topic', $this->forum_id) . '
ORDER BY topic_last_post_time DESC';
ORDER BY topic_last_post_time DESC, topic_last_post_id DESC';
$result = $this->db->sql_query_limit($sql, $this->num_items);
$topic_ids = array();
@@ -123,7 +123,7 @@ class forum extends \phpbb\feed\post_base
AND ' . $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.') . '
AND p.post_time >= ' . $min_post_time . '
AND p.poster_id = u.user_id',
'ORDER_BY' => 'p.post_time DESC',
'ORDER_BY' => 'p.post_time DESC, p.post_id DESC',
);
return true;