mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-05-07 15:27:44 +02:00
Fix issue where _redirect: /plugins was getting stored in the YAML on enable/disable of plugins
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user