]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't forget to add qstring to static paths
authorEvan Prodromou <evan@status.net>
Wed, 14 Sep 2011 20:13:54 +0000 (16:13 -0400)
committerEvan Prodromou <evan@status.net>
Wed, 14 Sep 2011 20:13:54 +0000 (16:13 -0400)
lib/urlmapper.php

index 6367d704261154c17ce89025c221f2bd1ce698c7..f16bf128ef83339efbaadfc8553b653923710f21 100644 (file)
@@ -147,7 +147,7 @@ class URLMapper
                     }
                 }
                 // success
-                return $tryPath;
+                $path = $tryPath;
             } else {
                 list($tryArgs, $format, $paramNames) = $candidate;
 
@@ -171,15 +171,18 @@ class URLMapper
                 }
 
                 $path = vsprintf($format, $toFormat);
+            }
 
-                if (!empty($qstring)) {
-                    $path .= '?' . http_build_query($qstring);
-                }
-
-                return $path;
+            if (!empty($qstring)) { 
+                $formatted = http_build_query($qstring);
+                $path .= '?' . $formatted;
             }
+
+            return $path;
         }
 
+        // failure; some reporting twiddles
+
         unset($args['action']);
 
         if (empty($args)) {