]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Pager.php
Partly reverted, real problem fixed
[friendica.git] / src / Content / Pager.php
index fafb68084c6b1bfd2d3e2983334250660d1d5ed2..c9acb63f236c4c361479a22bdf8af3b918776c67 100644 (file)
@@ -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)
        {