mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-11 18:15:20 +02:00
[ticket/10714] Add incorrect offset calculation in view_log function
PHPBB3-10714
This commit is contained in:
parent
91384d8395
commit
f5063a6eda
@ -2584,10 +2584,14 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($offset >= $log_count)
|
if ($log_count)
|
||||||
|
{
|
||||||
|
// Return the user to the last page that is valid
|
||||||
|
while ($offset >= $log_count)
|
||||||
{
|
{
|
||||||
$offset = ($offset - $limit < 0) ? 0 : $offset - $limit;
|
$offset = ($offset - $limit < 0) ? 0 : $offset - $limit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$sql = "SELECT l.*, u.username, u.username_clean, u.user_colour
|
$sql = "SELECT l.*, u.username, u.username_clean, u.user_colour
|
||||||
FROM " . LOG_TABLE . " l, " . USERS_TABLE . " u
|
FROM " . LOG_TABLE . " l, " . USERS_TABLE . " u
|
||||||
|
Loading…
x
Reference in New Issue
Block a user