From 88597e243abc1a24f46464266b9d623493d914ea Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 13 Apr 2010 06:59:57 +0000 Subject: [PATCH] BUGFIX: Fixed redirection destionation of the modeladmin delete button on the detail form. (from r97179) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@102709 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/ModelAdmin.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/ModelAdmin.php b/code/ModelAdmin.php index 250f0ec5..ce9a9e88 100755 --- a/code/ModelAdmin.php +++ b/code/ModelAdmin.php @@ -382,6 +382,7 @@ class ModelAdmin_CollectionController extends Controller { //$form->setFormAction(Controller::join_links($this->Link(), "search")); $form->setFormMethod('get'); $form->setHTMLID("Form_SearchForm_" . $this->modelClass); + $form->disableSecurityToken(); $clearAction->useButtonTag = true; $clearAction->addExtraClass('minorAction'); @@ -947,7 +948,7 @@ class ModelAdmin_RecordController extends Controller { public function doDelete($data, $form, $request) { if($this->currentRecord->canDelete(Member::currentUser())) { $this->currentRecord->delete(); - Director::redirect($this->parentController->Link()); + Director::redirect($this->parentController->Link('SearchForm?action=search')); } else Director::redirectBack(); return;