mirror of
https://github.com/friendica/friendica
synced 2024-12-22 22:00:16 +00:00
Update Pager->__construct calls for minimal use cases
This commit is contained in:
parent
7c0b591043
commit
74e80f137b
4 changed files with 4 additions and 4 deletions
|
@ -154,7 +154,7 @@ function community_content(App $a, $update = 0)
|
||||||
$itemspage_network = $a->force_max_items;
|
$itemspage_network = $a->force_max_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pager = new Pager($a->query_string, null, $itemspage_network);
|
$pager = new Pager($a->query_string, $itemspage_network);
|
||||||
|
|
||||||
$r = community_getitems($pager->getStart(), $pager->getItemsPerPage(), $content, $accounttype);
|
$r = community_getitems($pager->getStart(), $pager->getItemsPerPage(), $content, $accounttype);
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ function notes_content(App $a, $update = false)
|
||||||
$condition = ['uid' => local_user(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => GRAVITY_PARENT,
|
$condition = ['uid' => local_user(), 'post-type' => Item::PT_PERSONAL_NOTE, 'gravity' => GRAVITY_PARENT,
|
||||||
'wall' => false, 'contact-id'=> $a->contact['id']];
|
'wall' => false, 'contact-id'=> $a->contact['id']];
|
||||||
|
|
||||||
$pager = new Pager($a->query_string, null, 40);
|
$pager = new Pager($a->query_string, 40);
|
||||||
|
|
||||||
$params = ['order' => ['created' => true],
|
$params = ['order' => ['created' => true],
|
||||||
'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
'limit' => [$pager->getStart(), $pager->getItemsPerPage()]];
|
||||||
|
|
|
@ -121,7 +121,7 @@ function notifications_content(App $a)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the pager
|
// Set the pager
|
||||||
$pager = new Pager($a->query_string, null, $perpage);
|
$pager = new Pager($a->query_string, $perpage);
|
||||||
|
|
||||||
// Add additional informations (needed for json output)
|
// Add additional informations (needed for json output)
|
||||||
$notifs['items_page'] = $pager->getItemsPerPage();
|
$notifs['items_page'] = $pager->getItemsPerPage();
|
||||||
|
|
|
@ -308,7 +308,7 @@ function profile_content(App $a, $update = 0)
|
||||||
$itemspage_network = $a->force_max_items;
|
$itemspage_network = $a->force_max_items;
|
||||||
}
|
}
|
||||||
|
|
||||||
$pager = new Pager($a->query_string, null, $itemspage_network);
|
$pager = new Pager($a->query_string, $itemspage_network);
|
||||||
|
|
||||||
$pager_sql = sprintf(" LIMIT %d, %d ", $pager->getStart(), $pager->getItemsPerPage());
|
$pager_sql = sprintf(" LIMIT %d, %d ", $pager->getStart(), $pager->getItemsPerPage());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue