We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 7e76d116 authored by Evan Prodromou's avatar Evan Prodromou

make sure we have an integer value for askFor

parent 8981a420
......@@ -108,7 +108,7 @@ abstract class FilteringNoticeStream extends NoticeStream
if ($hits === 0) {
$askFor = max(min(2 * $askFor, NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE);
} else {
$askFor = max(min((($total - $hits)*$startAt)/$hits, NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE);
$askFor = max(min(intval(ceil(($total - $hits)*$startAt/$hits)), NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE);
}
common_debug(get_class($this) . ": ($offset, $limit) Round $round hits is $hits, results = $results.");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment