From 9454eb31e57f2276dfe2cf9ecdb2762d7d24615d Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 8 Jan 2013 19:39:44 +0100 Subject: [PATCH] BUGFIX Include URL action when redirecting in CMS This broke the CMSMain->publishall() action --- code/controller/TranslatableCMSMainExtension.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/code/controller/TranslatableCMSMainExtension.php b/code/controller/TranslatableCMSMainExtension.php index 5cd0897..c5dd61f 100644 --- a/code/controller/TranslatableCMSMainExtension.php +++ b/code/controller/TranslatableCMSMainExtension.php @@ -33,7 +33,15 @@ class TranslatableCMSMainExtension extends Extension { // the CMSPagesController always needs to have the locale set, // otherwise page editing will cause an extra // ajax request which looks weird due to multiple "loading"-flashes - return $this->owner->redirect($this->owner->Link()); + $getVars = $req->getVars(); + if(isset($getVars['url'])) unset($getVars['url']); + return $this->owner->redirect(Controller::join_links( + $this->owner->Link(), + $req->param('Action'), + $req->param('ID'), + $req->param('OtherID'), + '?' . http_build_query($getVars) + )); } } Translatable::set_current_locale($this->owner->Locale);