aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
authorOleg Pudeyev <oleg@bsdpower.com>2011-11-23 20:39:11 -0500
committerOleg Pudeyev <oleg@bsdpower.com>2011-11-23 20:39:11 -0500
commitd13ce7f5605ec99352b8314aabc51f2ecdd4456c (patch)
tree7e70bea58fbdb971b3835a8e7e6087f6caba0bd7 /phpBB
parentcd60073a525b3d38c3266a5dfc111ed0e3246b3a (diff)
parent74bca1d97b8bc8f4e5e571bff4edbf022820e54e (diff)
downloadforums-d13ce7f5605ec99352b8314aabc51f2ecdd4456c.tar
forums-d13ce7f5605ec99352b8314aabc51f2ecdd4456c.tar.gz
forums-d13ce7f5605ec99352b8314aabc51f2ecdd4456c.tar.bz2
forums-d13ce7f5605ec99352b8314aabc51f2ecdd4456c.tar.xz
forums-d13ce7f5605ec99352b8314aabc51f2ecdd4456c.zip
Merge branch 'prep-release-3.0.10' into develop-olympus
* prep-release-3.0.10: [ticket/10461] Add a comment explaining the logic here. [ticket/10461] Correct $log_count check in view_log() so we show logs again.
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions_admin.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 513b7a68b2..526bc16ff0 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -2609,7 +2609,11 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
$db->sql_freeresult($result);
}
- if ($log_count == 0)
+ // $log_count may be false here if false was passed in for it,
+ // because in this case we did not run the COUNT() query above.
+ // If we ran the COUNT() query and it returned zero rows, return;
+ // otherwise query for logs below.
+ if ($log_count === 0)
{
// Save the queries, because there are no logs to display
return 0;