diff --git a/admin/pagestart.php b/admin/pagestart.php index 69c2bce79..0a336eaaf 100644 --- a/admin/pagestart.php +++ b/admin/pagestart.php @@ -1,7 +1,6 @@ ' : '<'; - $sql_ordering = ($_GET['view'] == 'next') ? 'ASC' : 'DESC'; - - $sql = "SELECT t.topic_id - FROM ". BB_TOPICS ." t, ". BB_TOPICS ." t2 - WHERE t2.topic_id = $topic_id - AND t.forum_id = t2.forum_id - AND t.topic_moved_id = 0 - AND t.topic_last_post_id $sql_condition t2.topic_last_post_id - ORDER BY t.topic_last_post_id $sql_ordering - LIMIT 1"; - - if ($row = DB()->fetch_row($sql)) - { - $next_topic_id = $topic_id = $row['topic_id']; - } - else - { - $message = ($_GET['view'] == 'next') ? $lang['NO_NEWER_TOPICS'] : $lang['NO_OLDER_TOPICS']; - bb_die($message); - } -} - // Get forum/topic data if ($topic_id) {