1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge branch 'develop-ascraeus' into develop

# By Marc Alexander
# Via Dhruv Goel (1) and Marc Alexander (1)
* develop-ascraeus:
  [ticket/12966] Sort by post_time and post_id where applicable
  [ticket/12966] Sort posts by post_id in addition to sorting by post_time
This commit is contained in:
Dhruv
2014-08-29 20:44:41 +05:30
15 changed files with 51 additions and 33 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();