Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR Including GET parameters in X-ControllerURL default headers (wh…

…ich fixes e.g. AssetAdmin search persistence)
  • Loading branch information...
commit 620b23a23ffc371bd62a654f340d261c8ff629e0 1 parent eecca9b
@chillu chillu authored
Showing with 8 additions and 1 deletion.
  1. +8 −1 admin/code/LeftAndMain.php
View
9 admin/code/LeftAndMain.php
@@ -328,7 +328,14 @@ function handleRequest($request, DataModel $model) {
$response = parent::handleRequest($request, $model);
if(!$response->getHeader('X-Controller')) $response->addHeader('X-Controller', $this->class);
if(!$response->getHeader('X-Title')) $response->addHeader('X-Title', $title);
- if(!$response->getHeader('X-ControllerURL')) $response->addHeader('X-ControllerURL', $request->getURL());
+ if(!$response->getHeader('X-ControllerURL')) {
+ $url = $request->getURL();
+ if($getVars = $request->getVars()) {
+ if(isset($getVars['url'])) unset($getVars['url']);
+ $url = Controller::join_links($url, '?' . http_build_query($getVars));
+ }
+ $response->addHeader('X-ControllerURL', $url);
+ }
return $response;
}
Please sign in to comment.
Something went wrong with that request. Please try again.