1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +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

@@ -66,7 +66,7 @@ function mcp_front_view($id, $mode, $action)
FROM ' . POSTS_TABLE . '
WHERE ' . $db->sql_in_set('forum_id', $forum_list) . '
AND ' . $db->sql_in_set('post_visibility', array(ITEM_UNAPPROVED, ITEM_REAPPROVE)) . '
ORDER BY post_time DESC';
ORDER BY post_time DESC, post_id DESC';
$result = $db->sql_query_limit($sql, 5);
while ($row = $db->sql_fetchrow($result))
@@ -101,7 +101,7 @@ function mcp_front_view($id, $mode, $action)
WHERE ' . $db->sql_in_set('p.post_id', $post_list) . '
AND t.topic_id = p.topic_id
AND p.poster_id = u.user_id
ORDER BY p.post_time DESC';
ORDER BY p.post_time DESC, p.post_id DESC';
$result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result))
@@ -190,7 +190,7 @@ function mcp_front_view($id, $mode, $action)
AND p.poster_id = u2.user_id
AND ' . $db->sql_in_set('p.forum_id', $forum_list),
'ORDER_BY' => 'p.post_time DESC',
'ORDER_BY' => 'p.post_time DESC, p.post_id DESC',
);
/**

View File

@@ -1265,7 +1265,7 @@ function mcp_fork_topic($topic_ids)
$sql = 'SELECT *
FROM ' . POSTS_TABLE . "
WHERE topic_id = $topic_id
ORDER BY post_time ASC";
ORDER BY post_time ASC, post_id ASC";
$result = $db->sql_query($sql);
$post_rows = array();