mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUG Replace direct reference to $_REQUEST['url'] with request object getter
This commit is contained in:
parent
3e8237b17e
commit
1f632a10c9
@ -334,7 +334,8 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler {
|
||||
|
||||
if (empty($this->record)) {
|
||||
$controller = $this->getToplevelController();
|
||||
$noActionURL = $controller->removeAction($_REQUEST['url']);
|
||||
$url = $controller->getRequest()->getURL();
|
||||
$noActionURL = $controller->removeAction($url);
|
||||
$controller->getResponse()->removeHeader('Location'); //clear the existing redirect
|
||||
return $controller->redirect($noActionURL, 302);
|
||||
}
|
||||
@ -588,7 +589,8 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler {
|
||||
} else {
|
||||
// Changes to the record properties might've excluded the record from
|
||||
// a filtered list, so return back to the main view if it can't be found
|
||||
$noActionURL = $controller->removeAction($data['url']);
|
||||
$url = $controller->getRequest()->getURL();
|
||||
$noActionURL = $controller->removeAction($url);
|
||||
$controller->getRequest()->addHeader('X-Pjax', 'Content');
|
||||
return $controller->redirect($noActionURL, 302);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user