X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FBoundariesPager.php;h=df6ebf08a55387b7f3582bc3d28c40d047dd4b16;hb=8fd0d4cdc090dfdeeaf9beda8090c030d3f853c3;hp=8bbbde2b4764eed12362073f86d6895cee940647;hpb=72c198990e3d6dd23628ad15600b2089882e03c4;p=friendica.git diff --git a/src/Content/BoundariesPager.php b/src/Content/BoundariesPager.php index 8bbbde2b47..df6ebf08a5 100644 --- a/src/Content/BoundariesPager.php +++ b/src/Content/BoundariesPager.php @@ -1,6 +1,6 @@ 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); @@ -73,12 +73,12 @@ class BoundariesPager extends Pager } } - public function getStart() + public function getStart(): int { throw new \BadMethodCallException(); } - public function getPage() + public function getPage(): int { throw new \BadMethodCallException(); } @@ -102,7 +102,7 @@ class BoundariesPager extends Pager * @return string HTML string of the pager * @throws \Exception */ - public function renderMinimal(int $itemCount) + public function renderMinimal(int $itemCount): string { $displayedItemCount = max(0, intval($itemCount)); @@ -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' : '') @@ -130,7 +130,10 @@ class BoundariesPager extends Pager return Renderer::replaceMacros($tpl, ['pager' => $data]); } - public function renderFull($itemCount) + /** + * Unsupported method, must be type-compatible + */ + public function renderFull(int $itemCount): string { throw new \BadMethodCallException(); }