diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php index 545584b475..067955751d 100644 --- a/phpBB/viewforum.php +++ b/phpBB/viewforum.php @@ -178,7 +178,7 @@ if ($forum_data['forum_postable']) $limit_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'], 364 => $user->lang['1_YEAR']); $sort_by_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_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_id', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views'); + $sort_by_sql = array('a' => 't.topic_first_poster_name', 't' => 't.topic_last_post_time', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views'); $s_limit_days = $s_sort_key = $s_sort_dir = ''; gen_sort_selects($limit_days, $sort_by_text, $sort_days, $sort_key, $sort_dir, $s_limit_days, $s_sort_key, $s_sort_dir); @@ -205,11 +205,11 @@ if ($forum_data['forum_postable']) { if ($auth->acl_get('m_approve', $forum_id)) { - $topics_count = ($forum_data['forum_topics']) ? $forum_data['forum_topics'] : 1; + $topics_count = ($forum_data['forum_topics_real']) ? $forum_data['forum_topics_real'] : 1; } else { - $topics_count = ($forum_data['forum_topics_real']) ? $forum_data['forum_topics_real'] : 1; + $topics_count = ($forum_data['forum_topics']) ? $forum_data['forum_topics'] : 1; } $limit_topics_time = ''; }