Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MINOR Always set X-ControllerURL in CMS responses, in order to fix me…

…nu state after Ajax HTTP redirects (e.g. from CMSPageAddController to CMSPageEditController)
  • Loading branch information...
commit 8f8817b2f9bbb726e279437b61eaccc046f8a105 1 parent 51ff400
@chillu chillu authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  admin/code/LeftAndMain.php
View
3  admin/code/LeftAndMain.php
@@ -328,6 +328,7 @@ 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());
return $response;
}
@@ -368,7 +369,7 @@ public function Link($action = null) {
"$action"
);
}
-
+
/**
* Returns the menu title for the given LeftAndMain subclass.
* Implemented static so that we can get this value without instantiating an object.
Please sign in to comment.
Something went wrong with that request. Please try again.