aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-05-20 14:01:57 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-05-20 14:01:57 +0000
commitfc671590960689b6201048951624bc63595738ce (patch)
tree0d2ffd07785af5e42119366a22a15c6d5d4a3daa
parentf8a9ed538196fdf014e00b6dbf2e4b7d274b850f (diff)
downloadforums-fc671590960689b6201048951624bc63595738ce.tar
forums-fc671590960689b6201048951624bc63595738ce.tar.gz
forums-fc671590960689b6201048951624bc63595738ce.tar.bz2
forums-fc671590960689b6201048951624bc63595738ce.tar.xz
forums-fc671590960689b6201048951624bc63595738ce.zip
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
-rw-r--r--phpBB/viewforum.php5
-rw-r--r--phpBB/viewtopic.php5
2 files changed, 8 insertions, 2 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index a4774c37e8..daba02a28c 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -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";
}
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 0e68906ed8..126bc60b03 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -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 ";
}