|
@@ -76,6 +76,10 @@ function MessageIndex()
|
|
|
$context['unapproved_posts_message'] = sprintf($txt['there_are_unapproved_topics'], $untopics, $unposts, $scripturl . '?action=moderate;area=postmod;sa=' . ($board_info['unapproved_topics'] ? 'topics' : 'posts') . ';brd=' . $board);
|
|
|
}
|
|
|
|
|
|
+ // We only know these.
|
|
|
+ if (isset($_REQUEST['sort']) && !in_array($_REQUEST['sort'], array('subject', 'starter', 'last_poster', 'replies', 'views', 'first_post', 'last_post')))
|
|
|
+ $_REQUEST['sort'] = 'last_post';
|
|
|
+
|
|
|
// Make sure the starting place makes sense and construct the page index.
|
|
|
if (isset($_REQUEST['sort']))
|
|
|
$context['page_index'] = constructPageIndex($scripturl . '?board=' . $board . '.%1$d;sort=' . $_REQUEST['sort'] . (isset($_REQUEST['desc']) ? ';desc' : ''), $_REQUEST['start'], $board_info['total_topics'], $maxindex, true);
|