mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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:
parent
51ff4004d1
commit
8f8817b2f9
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user