mirror of
https://github.com/friendica/friendica
synced 2024-12-23 04:00:15 +00:00
Initialize array
This commit is contained in:
parent
229e7dcee5
commit
1530209266
1 changed files with 1 additions and 0 deletions
|
@ -203,6 +203,7 @@ class Timeline extends BaseModule
|
||||||
|
|
||||||
while (count($selected_items) < $this->itemsPerPage && ++$count < 50 && count($items) > 0) {
|
while (count($selected_items) < $this->itemsPerPage && ++$count < 50 && count($items) > 0) {
|
||||||
foreach ($items as $item) {
|
foreach ($items as $item) {
|
||||||
|
$numposts[$item['owner-id']] = ($numposts[$item['owner-id']] ?? 0);
|
||||||
if (!in_array($item['owner-id'], $reduced) || (($numposts[$item['owner-id']]++ < $maxpostperauthor)) && (count($selected_items) < $this->itemsPerPage)) {
|
if (!in_array($item['owner-id'], $reduced) || (($numposts[$item['owner-id']]++ < $maxpostperauthor)) && (count($selected_items) < $this->itemsPerPage)) {
|
||||||
$selected_items[] = $item;
|
$selected_items[] = $item;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue