mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: SSF-30 redirect action that sends an edit form back to the root of assets after making a change like changing the parentID of a file, or deleting it. Basically, any action that makes the existing URL reference obsolete.
This commit is contained in:
parent
676bcbe8c0
commit
febcff734c
@ -216,7 +216,12 @@ class GridFieldPopupForm_ItemRequest extends RequestHandler {
|
||||
* @return Form
|
||||
*/
|
||||
function ItemEditForm() {
|
||||
if (empty($this->record)) return null;
|
||||
if (empty($this->record)) {
|
||||
$controller = Controller::curr();
|
||||
$noActionURL = $controller->removeAction($_REQUEST['url']);
|
||||
$controller->getResponse()->removeHeader('Location'); //clear the existing redirect
|
||||
return Director::redirect($noActionURL, 302);
|
||||
}
|
||||
|
||||
$form = new Form(
|
||||
$this,
|
||||
|
Loading…
Reference in New Issue
Block a user