don't forget to add qstring to static paths

This commit is contained in:
Evan Prodromou 2011-09-14 16:13:54 -04:00
parent f6f147c0db
commit 601573a8a9

View File

@ -147,7 +147,7 @@ class URLMapper
} }
} }
// success // success
return $tryPath; $path = $tryPath;
} else { } else {
list($tryArgs, $format, $paramNames) = $candidate; list($tryArgs, $format, $paramNames) = $candidate;
@ -171,15 +171,18 @@ class URLMapper
} }
$path = vsprintf($format, $toFormat); $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']); unset($args['action']);
if (empty($args)) { if (empty($args)) {