From cd63652ae88df516f573aa201748f138a8f181c7 Mon Sep 17 00:00:00 2001 From: Patrick Schnell Date: Tue, 10 May 2016 05:42:54 +0200 Subject: [PATCH] fix broken redirects --- code/Debug/controllers/ConfigController.php | 6 ++++-- code/Debug/controllers/ModelController.php | 6 ++++-- code/Debug/controllers/ModuleController.php | 6 ++++-- code/Debug/controllers/UtilController.php | 21 ++++++++++++++------- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/code/Debug/controllers/ConfigController.php b/code/Debug/controllers/ConfigController.php index e1f7323..835dd30 100644 --- a/code/Debug/controllers/ConfigController.php +++ b/code/Debug/controllers/ConfigController.php @@ -47,7 +47,8 @@ public function enableVarienProfilerAction() $this->getService()->setVarienProfilerStatus(1); $this->getService()->flushCache(); - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } @@ -59,7 +60,8 @@ public function disableVarienProfilerAction() $this->getService()->setVarienProfilerStatus(0); $this->getService()->flushCache(); - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } diff --git a/code/Debug/controllers/ModelController.php b/code/Debug/controllers/ModelController.php index 8792436..a5b46c1 100644 --- a/code/Debug/controllers/ModelController.php +++ b/code/Debug/controllers/ModelController.php @@ -25,7 +25,8 @@ public function enableSqlProfilerAction() Mage::getSingleton('core/session')->addError('Unable to enable SQL profiler: ' . $e->getMessage()); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } @@ -43,7 +44,8 @@ public function disableSqlProfilerAction() Mage::getSingleton('core/session')->addError('Unable to disable SQL profiler: ' . $e->getMessage()); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } diff --git a/code/Debug/controllers/ModuleController.php b/code/Debug/controllers/ModuleController.php index b116e34..d26ab0d 100644 --- a/code/Debug/controllers/ModuleController.php +++ b/code/Debug/controllers/ModuleController.php @@ -26,7 +26,8 @@ public function enableAction() Mage::getSingleton('core/session')->addError('Unable to enable module: ' . $e->getMessage()); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } @@ -46,7 +47,8 @@ public function disableAction() Mage::getSingleton('core/session')->addError('Unable to disable module: ' . $e->getMessage()); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } } diff --git a/code/Debug/controllers/UtilController.php b/code/Debug/controllers/UtilController.php index 81e6e55..894ed52 100644 --- a/code/Debug/controllers/UtilController.php +++ b/code/Debug/controllers/UtilController.php @@ -60,7 +60,8 @@ public function flushCacheAction() $this->getSession()->addError($message); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } @@ -80,7 +81,8 @@ public function enableFPCDebugAction() $this->getSession()->addError($message); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } @@ -100,7 +102,8 @@ public function disableFPCDebugAction() $this->getSession()->addError($message); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } @@ -119,7 +122,8 @@ public function enableTemplateHintsAction() $this->getSession()->addError($message); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } @@ -137,7 +141,8 @@ public function disableTemplateHintsAction() $this->getSession()->addError($message); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } @@ -154,7 +159,8 @@ public function enableTranslateAction() $this->getSession()->addError($message); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } @@ -172,7 +178,8 @@ public function disableTranslateAction() $this->getSession()->addError($message); } - $this->_redirectReferer(); + $this->getResponse()->setRedirect(); + $this->getResponse()->sendResponse(); } }