MINOR Always set X-ControllerURL in CMS responses, in order to fix menu state after Ajax HTTP redirects (e.g. from CMSPageAddController to CMSPageEditController)

This commit is contained in:
Ingo Schommer 2012-03-12 13:41:22 +01:00
parent 51ff4004d1
commit 8f8817b2f9

View File

@ -328,6 +328,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
$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 @@ class LeftAndMain extends Controller implements PermissionProvider {
"$action"
);
}
/**
* Returns the menu title for the given LeftAndMain subclass.
* Implemented static so that we can get this value without instantiating an object.