X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FBoundariesPager.php;h=358539794cf38e38e6629eade1d9c8a1055fafcd;hb=ed350e472fb66e78cd9da066dc8684784bfc6c07;hp=b8b7f67bbaaa54d9db0093112ca3f6eb761eec4a;hpb=09961a07e48de836f0629b807c4a276c2ff06e87;p=friendica.git diff --git a/src/Content/BoundariesPager.php b/src/Content/BoundariesPager.php index b8b7f67bba..358539794c 100644 --- a/src/Content/BoundariesPager.php +++ b/src/Content/BoundariesPager.php @@ -1,6 +1,6 @@ last_item_id = $last_item_id; $parsed = parse_url($this->getBaseQueryString()); - if ($parsed) { + if (!empty($parsed['query'])) { parse_str($parsed['query'], $queryParameters); - $this->first_page = !($queryParameters['since_id'] ?? null) && !($queryParameters['max_id'] ?? null); + $this->first_page = !($queryParameters['min_id'] ?? null) && !($queryParameters['max_id'] ?? null); - unset($queryParameters['since_id']); + unset($queryParameters['min_id']); unset($queryParameters['max_id']); $parsed['query'] = http_build_query($queryParameters); @@ -111,7 +111,7 @@ class BoundariesPager extends Pager 'prev' => [ 'url' => Strings::ensureQueryParameter($this->baseQueryString . ($this->first_item_id >= $this->last_item_id ? - '&since_id=' . $this->first_item_id : '&max_id=' . $this->first_item_id) + '&min_id=' . $this->first_item_id : '&max_id=' . $this->first_item_id) ), 'text' => $this->l10n->t('newer'), 'class' => 'previous' . ($this->first_page ? ' disabled' : '') @@ -119,7 +119,7 @@ class BoundariesPager extends Pager 'next' => [ 'url' => Strings::ensureQueryParameter($this->baseQueryString . ($this->first_item_id >= $this->last_item_id ? - '&max_id=' . $this->last_item_id : '&since_id=' . $this->last_item_id) + '&max_id=' . $this->last_item_id : '&min_id=' . $this->last_item_id) ), 'text' => $this->l10n->t('older'), 'class' => 'next' . ($displayedItemCount < $this->getItemsPerPage() ? ' disabled' : '')