MINOR Keep X-ControllerURL canonical by not re-constructing with question mark if there's no GET string (caused duplicate HTML5 pushState requests)

This commit is contained in:
Ingo Schommer 2012-03-30 18:09:03 +02:00
parent af80ab5ab7
commit 0414e42bbc

View File

@ -332,7 +332,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
$url = $request->getURL();
if($getVars = $request->getVars()) {
if(isset($getVars['url'])) unset($getVars['url']);
$url = Controller::join_links($url, '?' . http_build_query($getVars));
$url = Controller::join_links($url, $getVars ? '?' . http_build_query($getVars) : '');
}
$response->addHeader('X-ControllerURL', $url);
}