Fix issue where _redirect: /plugins was getting stored in the YAML on enable/disable of plugins

This commit is contained in:
Andy Miller
2015-11-23 20:00:45 -07:00
parent 64daf0f534
commit 925fe14d7b

View File

@@ -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;