X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fmatch.php;h=4254e4c45a074dcac7eb4d5266478d24ac1238d8;hb=14237a95998bed6a5fe5e7e9122970b9dea77a27;hp=b299619940e670385d4c54f3794d8ff25a5a9c32;hpb=a976a4cb68d196a2fb7d38247c3ad30a0026d327;p=friendica.git diff --git a/mod/match.php b/mod/match.php index b299619940..4254e4c45a 100644 --- a/mod/match.php +++ b/mod/match.php @@ -4,6 +4,7 @@ */ use Friendica\App; +use Friendica\Content\Pager; use Friendica\Content\Widget; use Friendica\Core\Config; use Friendica\Core\L10n; @@ -54,8 +55,8 @@ function match_content(App $a) if ($tags) { $params['s'] = $tags; - if ($a->pager['page'] != 1) { - $params['p'] = $a->pager['page']; + if ($pager->getPage() != 1) { + $params['p'] = $pager->getPage(); } if (strlen(Config::get('system', 'directory'))) { @@ -66,12 +67,9 @@ function match_content(App $a) $j = json_decode($x); - if ($j->total) { - $a->setPagerTotal($j->total); - $a->setPagerItemsPage($j->items_page); - } - if (count($j->results)) { + $pager = new Pager($a->query_string, $j->total, $j->items_page); + $id = 0; foreach ($j->results as $jj) { @@ -119,7 +117,7 @@ function match_content(App $a) [ '$title' => L10n::t('Profile Match'), '$contacts' => $entries, - '$paginate' => paginate($a)] + '$paginate' => $pager->renderFull()] ); } else { info(L10n::t('No matches') . EOL);