X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FPager.php;h=c9acb63f236c4c361479a22bdf8af3b918776c67;hb=486f1393429afc17ba57f31690fa2388f8925f82;hp=fafb68084c6b1bfd2d3e2983334250660d1d5ed2;hpb=ec8b313c2d1fa818b976902c5a044a8425696ae4;p=friendica.git diff --git a/src/Content/Pager.php b/src/Content/Pager.php index fafb68084c..c9acb63f23 100644 --- a/src/Content/Pager.php +++ b/src/Content/Pager.php @@ -65,7 +65,7 @@ class Pager /** * Returns the current page number * - * @return type + * @return int */ public function getPage() { @@ -83,7 +83,7 @@ class Pager */ public function getBaseQueryString() { - return $this->baseQueryString; + return Strings::ensureQueryParameter($this->baseQueryString); } /** @@ -123,21 +123,6 @@ class Pager $this->baseQueryString = $stripped; } - /** - * Ensures the provided URI has its query string punctuation in order. - * - * @param string $uri - * @return string - */ - private function ensureQueryParameter($uri) - { - if (strpos($uri, '?') === false && ($pos = strpos($uri, '&')) !== false) { - $uri = substr($uri, 0, $pos) . '?' . substr($uri, $pos + 1); - } - - return $uri; - } - /** * @brief Minimal pager (newer/older) * @@ -155,6 +140,7 @@ class Pager * * @param integer $itemCount The number of displayed items on the page * @return string HTML string of the pager + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public function renderMinimal($itemCount) { @@ -197,6 +183,7 @@ class Pager * * @param integer $itemCount The total number of items including those note displayed on the page * @return string HTML string of the pager + * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ public function renderFull($itemCount) {