X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FPager.php;h=bf5a5f691442032346a97ee0e9eda73efcb70375;hb=014c7b59431fb72055b088affd452d8c146eb0c9;hp=a7d7fe8f78461cac78b65ddbe3fe5ed78d540f3c;hpb=e89e606b8827f6dc43f29db0965e27b12249d9dd;p=friendica.git diff --git a/src/Content/Pager.php b/src/Content/Pager.php index a7d7fe8f78..bf5a5f6914 100644 --- a/src/Content/Pager.php +++ b/src/Content/Pager.php @@ -1,6 +1,6 @@ l10n = $l10n; + $this->setQueryString($queryString); $this->setItemsPerPage($itemsPerPage); $this->setPage(($_GET['page'] ?? 0) ?: 1); @@ -126,7 +128,7 @@ class Pager /** * Sets the base query string from a full query string. * - * Strips the 'page' parameter, and remove the 'q=' string for some reason. + * Strips the 'page' parameter * * @param string $queryString */ @@ -166,12 +168,12 @@ class Pager 'class' => 'pager', 'prev' => [ 'url' => Strings::ensureQueryParameter($this->baseQueryString . '&page=' . ($this->getPage() - 1)), - 'text' => DI::l10n()->t('newer'), + 'text' => $this->l10n->t('newer'), 'class' => 'previous' . ($this->getPage() == 1 ? ' disabled' : '') ], 'next' => [ 'url' => Strings::ensureQueryParameter($this->baseQueryString . '&page=' . ($this->getPage() + 1)), - 'text' => DI::l10n()->t('older'), + 'text' => $this->l10n->t('older'), 'class' => 'next' . ($displayedItemCount < $this->getItemsPerPage() ? ' disabled' : '') ] ]; @@ -211,12 +213,12 @@ class Pager if ($totalItemCount > $this->getItemsPerPage()) { $data['first'] = [ 'url' => Strings::ensureQueryParameter($this->baseQueryString . '&page=1'), - 'text' => DI::l10n()->t('first'), + 'text' => $this->l10n->t('first'), 'class' => $this->getPage() == 1 ? 'disabled' : '' ]; $data['prev'] = [ 'url' => Strings::ensureQueryParameter($this->baseQueryString . '&page=' . ($this->getPage() - 1)), - 'text' => DI::l10n()->t('prev'), + 'text' => $this->l10n->t('prev'), 'class' => $this->getPage() == 1 ? 'disabled' : '' ]; @@ -271,12 +273,12 @@ class Pager $data['next'] = [ 'url' => Strings::ensureQueryParameter($this->baseQueryString . '&page=' . ($this->getPage() + 1)), - 'text' => DI::l10n()->t('next'), + 'text' => $this->l10n->t('next'), 'class' => $this->getPage() == $lastpage ? 'disabled' : '' ]; $data['last'] = [ 'url' => Strings::ensureQueryParameter($this->baseQueryString . '&page=' . $lastpage), - 'text' => DI::l10n()->t('last'), + 'text' => $this->l10n->t('last'), 'class' => $this->getPage() == $lastpage ? 'disabled' : '' ]; }