abstract function filter($notice);
- function getNotices($offset, $limit, $sinceId, $maxId)
+ function getNotices($offset, $limit, $sinceId=null, $maxId=null)
{
// "offset" is virtual; we have to get a lot
$total = $offset + $limit;
while ($raw->fetch()) {
if ($this->filter($raw)) {
$filtered[] = clone($raw);
- if (count($filtered >= $total)) {
+ if (count($filtered) >= $total) {
break;
}
}
$ids = array();
while ($notices->fetch()) {
- $ids[] = $notice->id;
+ $ids[] = $notices->id;
}
return $ids;