+ $hits = count($filtered);
+ $lastAsk = $askFor;
+
+ if ($hits === 0) {
+ $askFor = max(min(2 * $askFor, NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE);
+ } else {
+ $askFor = max(min(intval(ceil(($total - $hits)*$startAt/$hits)), NOTICES_PER_PAGE * 50), NOTICES_PER_PAGE);
+ }