From 623235bd76569d1ad7a17b1115d1cbf59ce33084 Mon Sep 17 00:00:00 2001 From: "Paul S. Owen" Date: Tue, 31 Dec 2002 13:49:17 +0000 Subject: [PATCH] Wrong variable name git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@3247 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index dee35b58af..ffee96ecdd 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -389,14 +389,14 @@ if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, "Could not obtain post/user information.", '', __LINE__, __FILE__, $sql); } -if ( $row = $db->sql_fetchrow($result) ) +$postrow = array(); +if ($row = $db->sql_fetchrow($result)) { - $postrow = array(); do { $postrow[] = $row; } - while ( $row = $db->sql_fetchrow($result) ); + while ($row = $db->sql_fetchrow($result)); $db->sql_freeresult($result); $total_posts = count($postrow); @@ -410,19 +410,19 @@ else } $resync = FALSE; -if ($forum_topic_data['topic_replies'] + 1 < $start + count($postrows)) +if ($forum_topic_data['topic_replies'] + 1 < $start + count($postrow)) { $resync = TRUE; } elseif ($start + $board_config['posts_per_page'] > $forum_topic_data['topic_replies']) { $row_id = intval($forum_topic_data['topic_replies']) % intval($board_config['posts_per_page']); - if ($postrows[$row_id]['post_id'] != $forum_topic_data['topic_last_post_id'] || $start + count($postrows) < $forum_topic_data['topic_replies']) + if ($postrow[$row_id]['post_id'] != $forum_topic_data['topic_last_post_id'] || $start + count($postrow) < $forum_topic_data['topic_replies']) { $resync = TRUE; } } -elseif (count($postrows) < $board_config['posts_per_page']) +elseif (count($postrow) < $board_config['posts_per_page']) { $resync = TRUE; }