mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +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:
@@ -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;
|
||||
|
@@ -99,7 +99,7 @@ class news extends \phpbb\feed\topic_base
|
||||
),
|
||||
'WHERE' => 'p.topic_id = t.topic_id
|
||||
AND ' . $this->db->sql_in_set('p.post_id', $post_ids),
|
||||
'ORDER_BY' => 'p.post_time DESC',
|
||||
'ORDER_BY' => 'p.post_time DESC, p.post_id DESC',
|
||||
);
|
||||
|
||||
return true;
|
||||
|
@@ -34,7 +34,7 @@ class overall extends \phpbb\feed\post_base
|
||||
FROM ' . TOPICS_TABLE . '
|
||||
WHERE topic_moved_id = 0
|
||||
AND ' . $this->content_visibility->get_forums_visibility_sql('topic', $forum_ids) . '
|
||||
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();
|
||||
@@ -71,7 +71,7 @@ class overall extends \phpbb\feed\post_base
|
||||
AND ' . $this->content_visibility->get_forums_visibility_sql('post', $forum_ids, 'p.') . '
|
||||
AND p.post_time >= ' . $min_post_time . '
|
||||
AND u.user_id = p.poster_id',
|
||||
'ORDER_BY' => 'p.post_time DESC',
|
||||
'ORDER_BY' => 'p.post_time DESC, p.post_id DESC',
|
||||
);
|
||||
|
||||
return true;
|
||||
|
@@ -101,7 +101,7 @@ class topic extends \phpbb\feed\post_base
|
||||
'WHERE' => 'p.topic_id = ' . $this->topic_id . '
|
||||
AND ' . $this->content_visibility->get_visibility_sql('post', $this->forum_id, 'p.') . '
|
||||
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;
|
||||
|
@@ -71,7 +71,7 @@ class topics extends \phpbb\feed\topic_base
|
||||
),
|
||||
'WHERE' => 'p.topic_id = t.topic_id
|
||||
AND ' . $this->db->sql_in_set('p.post_id', $post_ids),
|
||||
'ORDER_BY' => 'p.post_time DESC',
|
||||
'ORDER_BY' => 'p.post_time DESC, p.post_id DESC',
|
||||
);
|
||||
|
||||
return true;
|
||||
|
@@ -56,7 +56,7 @@ class topics_active extends \phpbb\feed\topic_base
|
||||
WHERE topic_moved_id = 0
|
||||
AND ' . $this->content_visibility->get_forums_visibility_sql('topic', $in_fid_ary) . '
|
||||
' . $last_post_time_sql . '
|
||||
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);
|
||||
|
||||
$post_ids = array();
|
||||
@@ -88,7 +88,7 @@ class topics_active extends \phpbb\feed\topic_base
|
||||
),
|
||||
'WHERE' => 'p.topic_id = t.topic_id
|
||||
AND ' . $this->db->sql_in_set('p.post_id', $post_ids),
|
||||
'ORDER_BY' => 'p.post_time DESC',
|
||||
'ORDER_BY' => 'p.post_time DESC, p.post_id DESC',
|
||||
);
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user