]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix to Net_URL_Mapper to make search pagination work. See Ticket #1333
authorCiaranG <ciaran@ciarang.com>
Sat, 21 Mar 2009 14:24:19 +0000 (14:24 +0000)
committerEvan Prodromou <evan@controlyourself.ca>
Wed, 25 Mar 2009 16:24:22 +0000 (12:24 -0400)
extlib/Net/URL/Mapper/Path.php

index b541002c7af6a4473ec16b43b0b34eceac472f33..eb1c34a3fab95a7180619028c6df7a959502c79f 100644 (file)
@@ -241,7 +241,12 @@ class Net_URL_Mapper_Path
         }
         $path = '/'.trim(Net_URL::resolvePath($path), '/');
         if (!empty($qstring)) {
-            $path .= '?'.http_build_query($qstring);
+            if (!strpos($path, '?')) {
+                $path .= '?';
+            } else {
+                $path .= '&';
+            }
+           $path .= http_build_query($qstring);
         }
         if (!empty($anchor)) {
             $path .= '#'.ltrim($anchor, '#');
@@ -427,4 +432,4 @@ class Net_URL_Mapper_Path
 
 }
 
-?>
\ No newline at end of file
+?>