From 925fe14d7b0dad891daf4afe738766743105c818 Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Mon, 23 Nov 2015 20:00:45 -0700 Subject: [PATCH] Fix issue where _redirect: /plugins was getting stored in the YAML on enable/disable of plugins --- classes/controller.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/classes/controller.php b/classes/controller.php index 94f9326b..e70f5f67 100644 --- a/classes/controller.php +++ b/classes/controller.php @@ -722,9 +722,11 @@ class AdminController } // Filter value and save it. - $this->post = array('enabled' => 1, '_redirect' => 'plugins'); + $this->post = array('enabled' => 1); $obj = $this->prepareData(); $obj->save(); + + $this->post = array('_redirect' => 'plugins'); $this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.SUCCESSFULLY_ENABLED_PLUGIN'), 'info'); return true; @@ -746,9 +748,11 @@ class AdminController } // Filter value and save it. - $this->post = array('enabled' => 0, '_redirect' => 'plugins'); + $this->post = array('enabled' => 0); $obj = $this->prepareData(); $obj->save(); + + $this->post = array('_redirect' => 'plugins'); $this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.SUCCESSFULLY_DISABLED_PLUGIN'), 'info'); return true;