aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewforum.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2005-01-27 18:36:57 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2005-01-27 18:36:57 +0000
commitb26f910eb149109a15eba40ad030e1b9751393d9 (patch)
tree96298aa6569ce0a582ffbdf59f72ace3666b0fc7 /phpBB/viewforum.php
parent89b5c490efc5e31f8a9533b9854ccb92b02bf33c (diff)
downloadforums-b26f910eb149109a15eba40ad030e1b9751393d9.tar
forums-b26f910eb149109a15eba40ad030e1b9751393d9.tar.gz
forums-b26f910eb149109a15eba40ad030e1b9751393d9.tar.bz2
forums-b26f910eb149109a15eba40ad030e1b9751393d9.tar.xz
forums-b26f910eb149109a15eba40ad030e1b9751393d9.zip
- sticky bug fix
git-svn-id: file:///svn/phpbb/trunk@5081 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewforum.php')
-rw-r--r--phpBB/viewforum.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/viewforum.php b/phpBB/viewforum.php
index e36c321329..e3e3ff33b4 100644
--- a/phpBB/viewforum.php
+++ b/phpBB/viewforum.php
@@ -333,11 +333,11 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16)
}
// If the user is trying to reach late pages, start searching from the end
- $store_reverse = FALSE;
+ $store_reverse = false;
$sql_limit = $config['topics_per_page'];
if ($start > $topics_count / 2)
{
- $store_reverse = TRUE;
+ $store_reverse = true;
if ($start + $config['topics_per_page'] > $topics_count)
{
@@ -365,7 +365,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16)
AND t.topic_type NOT IN (" . POST_ANNOUNCE . ', ' . POST_GLOBAL . ")
$sql_approved
$sql_limit_time
- ORDER BY t.topic_type DESC, $sql_sort_order";
+ ORDER BY t.topic_type " . ((!$store_reverse) ? 'DESC' : 'ASC') . ', ' . $sql_sort_order;
$result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
while ($row = $db->sql_fetchrow($result))
@@ -378,7 +378,7 @@ if ($forum_data['forum_type'] == FORUM_POST || ($forum_data['forum_flags'] & 16)
$topic_list = ($store_reverse) ? array_merge($announcement_list, array_reverse($topic_list)) : array_merge($announcement_list, $topic_list);
// Okay, lets dump out the page ...
- if (count($topic_list))
+ if (sizeof($topic_list))
{
if ($config['load_db_lastread'])
{