Only set start = 0 when first sorting ... else it screws everything up :)

git-svn-id: file:///svn/phpbb/trunk@4031 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2003-05-20 14:01:57 +00:00
parent f8a9ed5381
commit fc67159096
2 changed files with 8 additions and 2 deletions

View file

@ -220,7 +220,10 @@ if ($forum_data['forum_type'] == FORUM_POST)
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1');
$result = $db->sql_query($sql);
$start = 0;
if (isset($_POST['sort']))
{
$start = 0;
}
$topics_count = ($row = $db->sql_fetchrow($result)) ? $row['num_topics'] : 0;
$sql_limit_time = "AND t.topic_last_post_time >= $min_post_time";
}

View file

@ -269,7 +269,10 @@ if ($sort_days)
" . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1');
$result = $db->sql_query($sql);
$start = 0;
if (isset($_POST['sort']))
{
$start = 0;
}
$total_posts = ($row = $db->sql_fetchrow($result)) ? $row['num_posts'] : 0;
$limit_posts_time = "AND p.post_time >= $min_post_time ";
}