]> git.mxchange.org Git - friendica.git/commitdiff
Merge branch 'release-3.3.3' into develop
authorfabrixxm <fabrix.xm@gmail.com>
Sat, 7 Feb 2015 11:57:12 +0000 (12:57 +0100)
committerfabrixxm <fabrix.xm@gmail.com>
Sat, 7 Feb 2015 11:57:12 +0000 (12:57 +0100)
include/text.php

index f77f81e7d7f70c5165e9b6eacdc3a9a7663454fb..43b321e98a01f503ce960e8ae91e32b0eb3310c3 100644 (file)
@@ -276,17 +276,17 @@ function paginate_data(&$a, $count=null) {
        $stripped = trim($stripped,'/');
        $pagenum = $a->pager['page'];
 
-       if (($a->page_offset != "") AND !strstr($stripped, "&offset="))
+       if (($a->page_offset != "") AND !preg_match('/[?&].offset=/', $stripped))
                $stripped .= "&offset=".urlencode($a->page_offset);
-       if (!strpos($stripped, "?")) {
-               if ($pos = strpos($stripped, "&"))
-                       $stripped = substr($stripped, 0, $pos)."?".substr($stripped, $pos + 1);
-       }
 
        $url = $a->get_baseurl() . '/' . $stripped;
 
        $data = array();
        function _l(&$d, $name, $url, $text, $class="") {
+               if (!strpos($url, "?")) {
+                       if ($pos = strpos($url, "&"))
+                               $url = substr($url, 0, $pos)."?".substr($url, $pos + 1);
+               }
 
                $d[$name] = array('url'=>$url, 'text'=>$text, 'class'=>$class);
        }