From: Evan Prodromou Date: Wed, 14 Sep 2011 20:13:54 +0000 (-0400) Subject: don't forget to add qstring to static paths X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=601573a8a929b22ec3c54c94f0e68a792bc83308;p=quix0rs-gnu-social.git don't forget to add qstring to static paths --- diff --git a/lib/urlmapper.php b/lib/urlmapper.php index 6367d70426..f16bf128ef 100644 --- a/lib/urlmapper.php +++ b/lib/urlmapper.php @@ -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)) {