diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2011-11-23 20:39:29 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2011-11-23 20:39:29 -0500 |
commit | 817ef638d1ede4e3f6afb54fc0968b777f368957 (patch) | |
tree | 22bd915bcfc856c4652f1189502bc80ab0201462 /phpBB/includes | |
parent | 4b8f00f64901d8b630cb82ad9ae6294e2c56371c (diff) | |
parent | d13ce7f5605ec99352b8314aabc51f2ecdd4456c (diff) | |
download | forums-817ef638d1ede4e3f6afb54fc0968b777f368957.tar forums-817ef638d1ede4e3f6afb54fc0968b777f368957.tar.gz forums-817ef638d1ede4e3f6afb54fc0968b777f368957.tar.bz2 forums-817ef638d1ede4e3f6afb54fc0968b777f368957.tar.xz forums-817ef638d1ede4e3f6afb54fc0968b777f368957.zip |
Merge branch 'develop-olympus' into develop
* develop-olympus:
[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/includes')
-rw-r--r-- | phpBB/includes/functions_admin.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php index 3f9e517fdf..e877674715 100644 --- a/phpBB/includes/functions_admin.php +++ b/phpBB/includes/functions_admin.php @@ -2610,7 +2610,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; |