From 601573a8a929b22ec3c54c94f0e68a792bc83308 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 14 Sep 2011 16:13:54 -0400 Subject: [PATCH] don't forget to add qstring to static paths --- lib/urlmapper.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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)) { -- 2.39.5