aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2009-03-19 19:24:47 +0000
committerChris Smith <toonarmy@phpbb.com>2009-03-19 19:24:47 +0000
commit06c4fbf81fdc66cc3eea11628b35f5c4ebbbaaba (patch)
treeac03099c701b18c2748dd91b338f91c3c9918b60 /phpBB/viewtopic.php
parente461162847b1ac9287870de680e8dbd17e9f2fc1 (diff)
downloadforums-06c4fbf81fdc66cc3eea11628b35f5c4ebbbaaba.tar
forums-06c4fbf81fdc66cc3eea11628b35f5c4ebbbaaba.tar.gz
forums-06c4fbf81fdc66cc3eea11628b35f5c4ebbbaaba.tar.bz2
forums-06c4fbf81fdc66cc3eea11628b35f5c4ebbbaaba.tar.xz
forums-06c4fbf81fdc66cc3eea11628b35f5c4ebbbaaba.zip
SQL optimisations
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9399 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 6cc7de0106..02bb502075 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -898,7 +898,7 @@ $result = $db->sql_query_limit($sql, $sql_limit, $sql_start);
$i = ($store_reverse) ? $sql_limit - 1 : 0;
while ($row = $db->sql_fetchrow($result))
{
- $post_list[$i] = $row['post_id'];
+ $post_list[$i] = (int) $row['post_id'];
($store_reverse) ? $i-- : $i++;
}
$db->sql_freeresult($result);
@@ -952,12 +952,12 @@ while ($row = $db->sql_fetchrow($result))
$max_post_time = $row['post_time'];
}
- $poster_id = $row['poster_id'];
+ $poster_id = (int) $row['poster_id'];
// Does post have an attachment? If so, add it to the list
if ($row['post_attachment'] && $config['allow_attachments'])
{
- $attach_list[] = $row['post_id'];
+ $attach_list[] = (int) $row['post_id'];
if ($row['post_approved'])
{