Move itemCount parameter from constructor to renderFull()

- Remove Pager->itemCount property and Pager->setItemCount() method
- Update usage
This commit is contained in:
Hypolite Petovan
2018-10-24 11:42:59 -04:00
parent 14237a9599
commit 7c0b591043
12 changed files with 70 additions and 80 deletions

View File

@@ -46,7 +46,7 @@ function allfriends_content(App $a)
$total = Model\GContact::countAllFriends(local_user(), $cid);
$pager = new Pager($a->query_string, $total);
$pager = new Pager($a->query_string);
$r = Model\GContact::allFriends(local_user(), $cid, $pager->getStart(), $pager->getItemsPerPage());
if (!DBA::isResult($r)) {
@@ -104,7 +104,7 @@ function allfriends_content(App $a)
//'$title' => L10n::t('Friends of %s', htmlentities($c[0]['name'])),
'$tab_str' => $tab_str,
'$contacts' => $entries,
'$paginate' => $pager->renderFull(),
'$paginate' => $pager->renderFull($total),
]);
return $o;