X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fallfriends.php;h=b233a46182050ddc8d37b3d266950117bb300132;hb=a8b0aa8c8d97a2d28b357fca17a63f2930c6b640;hp=cee067e97acf1ab9791a667a89f4bea89c175209;hpb=f303f9edf2dd9943d07e6507006f61ca2abadaa5;p=friendica.git diff --git a/mod/allfriends.php b/mod/allfriends.php index cee067e97a..b233a46182 100644 --- a/mod/allfriends.php +++ b/mod/allfriends.php @@ -5,7 +5,9 @@ use Friendica\App; use Friendica\Content\ContactSelector; +use Friendica\Content\Pager; use Friendica\Core\L10n; +use Friendica\Core\Renderer; use Friendica\Core\System; use Friendica\Database\DBA; use Friendica\Model; @@ -45,9 +47,9 @@ function allfriends_content(App $a) $total = Model\GContact::countAllFriends(local_user(), $cid); - $a->setPagerTotal($total); + $pager = new Pager($a->query_string); - $r = Model\GContact::allFriends(local_user(), $cid, $a->pager['start'], $a->pager['itemspage']); + $r = Model\GContact::allFriends(local_user(), $cid, $pager->getStart(), $pager->getItemsPerPage()); if (!DBA::isResult($r)) { $o .= L10n::t('No friends to display.'); return $o; @@ -97,13 +99,13 @@ function allfriends_content(App $a) $tab_str = Module\Contact::getTabsHTML($a, $contact, 4); - $tpl = get_markup_template('viewcontact_template.tpl'); + $tpl = Renderer::getMarkupTemplate('viewcontact_template.tpl'); - $o .= replace_macros($tpl, [ + $o .= Renderer::replaceMacros($tpl, [ //'$title' => L10n::t('Friends of %s', htmlentities($c[0]['name'])), '$tab_str' => $tab_str, '$contacts' => $entries, - '$paginate' => paginate($a), + '$paginate' => $pager->renderFull($total), ]); return $o;