diff options
author | Dhruv Goel <dhruv.goel92@gmail.com> | 2014-08-29 20:44:01 +0530 |
---|---|---|
committer | Dhruv Goel <dhruv.goel92@gmail.com> | 2014-08-29 20:44:01 +0530 |
commit | 6d9c0a76df2ab2b55b8f863a412f0fcf10599196 (patch) | |
tree | 8d1c346db0ae10982086a145b3323232d70aeaf8 /phpBB/includes/ucp | |
parent | cbbef46c6cd3d453019779db0d6ef700cf11762b (diff) | |
parent | e5e45f860b798c955f1817001f07aabcbccbabcf (diff) | |
download | forums-6d9c0a76df2ab2b55b8f863a412f0fcf10599196.tar forums-6d9c0a76df2ab2b55b8f863a412f0fcf10599196.tar.gz forums-6d9c0a76df2ab2b55b8f863a412f0fcf10599196.tar.bz2 forums-6d9c0a76df2ab2b55b8f863a412f0fcf10599196.tar.xz forums-6d9c0a76df2ab2b55b8f863a412f0fcf10599196.zip |
Merge pull request #2865 from marc1706/ticket/12966
[ticket/12966] Sort posts by post_id in addition to sorting by post_time
Diffstat (limited to 'phpBB/includes/ucp')
-rw-r--r-- | phpBB/includes/ucp/ucp_main.php | 6 | ||||
-rw-r--r-- | phpBB/includes/ucp/ucp_prefs.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/includes/ucp/ucp_main.php b/phpBB/includes/ucp/ucp_main.php index 304c04eb3d..a1624e78ec 100644 --- a/phpBB/includes/ucp/ucp_main.php +++ b/phpBB/includes/ucp/ucp_main.php @@ -81,7 +81,7 @@ class ucp_main FROM $sql_from WHERE t.topic_type = " . POST_GLOBAL . ' AND ' . $db->sql_in_set('t.forum_id', $forum_ary) . ' - ORDER BY t.topic_last_post_time DESC'; + ORDER BY t.topic_last_post_time DESC, t.topic_last_post_id DESC'; $result = $db->sql_query($sql); while ($row = $db->sql_fetchrow($result)) @@ -693,7 +693,7 @@ class ucp_main AND t.topic_id = tw.topic_id AND ' . $db->sql_in_set('t.forum_id', $forbidden_forum_ary, true, true), - 'ORDER_BY' => 't.topic_last_post_time DESC' + 'ORDER_BY' => 't.topic_last_post_time DESC, t.topic_last_post_id DESC' ); $sql_array['LEFT_JOIN'] = array(); @@ -710,7 +710,7 @@ class ucp_main 'WHERE' => 'b.user_id = ' . $user->data['user_id'] . ' AND ' . $db->sql_in_set('f.forum_id', $forbidden_forum_ary, true, true), - 'ORDER_BY' => 't.topic_last_post_time DESC' + 'ORDER_BY' => 't.topic_last_post_time DESC, t.topic_last_post_id DESC' ); $sql_array['LEFT_JOIN'] = array(); diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index a8c8920a7d..b0a8e8d374 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -320,7 +320,7 @@ class ucp_prefs $limit_topic_days = array(0 => $user->lang['ALL_TOPICS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); $sort_by_topic_text = array('a' => $user->lang['AUTHOR'], 't' => $user->lang['POST_TIME'], 'r' => $user->lang['REPLIES'], 's' => $user->lang['SUBJECT'], 'v' => $user->lang['VIEWS']); - $sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_posts_approved', 's' => 't.topic_title', 'v' => 't.topic_views'); + $sort_by_topic_sql = array('a' => 't.topic_first_poster_name', 't' => array('t.topic_last_post_time', 't.topic_last_post_id'), 'r' => 't.topic_posts_approved', 's' => 't.topic_title', 'v' => 't.topic_views'); // Post ordering options $limit_post_days = array(0 => $user->lang['ALL_POSTS'], 1 => $user->lang['1_DAY'], 7 => $user->lang['7_DAYS'], 14 => $user->lang['2_WEEKS'], 30 => $user->lang['1_MONTH'], 90 => $user->lang['3_MONTHS'], 180 => $user->lang['6_MONTHS'], 365 => $user->lang['1_YEAR']); |