1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-05-06 07:35:29 +02:00

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.
This commit is contained in:
Oleg Pudeyev 2011-11-23 20:39:11 -05:00
commit d13ce7f560

View File

@ -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;