From 0414e42bbce51e721922f1dd7e658c7459f3bcda Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 30 Mar 2012 18:09:03 +0200 Subject: [PATCH] MINOR Keep X-ControllerURL canonical by not re-constructing with question mark if there's no GET string (caused duplicate HTML5 pushState requests) --- admin/code/LeftAndMain.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/code/LeftAndMain.php b/admin/code/LeftAndMain.php index df88b41a3..851226124 100644 --- a/admin/code/LeftAndMain.php +++ b/admin/code/LeftAndMain.php @@ -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); }