Don't rely on MySQL's 'Natural Order', it might not be right, use explicit ORDER BY clause

This commit is contained in:
Travis Burtrum 2014-02-09 21:04:41 -06:00
parent 71ca8a524a
commit 25cc5c42df

View File

@ -73,7 +73,8 @@ function getBoardIndex($boardIndexOptions)
AND b.child_level >= {int:child_level}') : '
AND b.child_level BETWEEN ' . $boardIndexOptions['base_level'] . ' AND ' . ($boardIndexOptions['base_level'] + 1)) .
//xxx show archived boards
(isset($show_archived) && !$show_archived ? ' AND c.forumid = 1' : ''),
(isset($show_archived) && !$show_archived ? ' AND c.forumid = 1' : '').'
ORDER BY ' . ($boardIndexOptions['include_categories'] ? 'c.cat_order, ' : '') . 'b.board_order',
array(
'current_member' => $user_info['id'],
'child_level' => $boardIndexOptions['base_level'],