diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/admin/plugins/disable.php | 17 | ||||
-rw-r--r-- | actions/admin/plugins/enable.php | 17 |
2 files changed, 22 insertions, 12 deletions
diff --git a/actions/admin/plugins/disable.php b/actions/admin/plugins/disable.php index 8724759a6..cbe75a665 100644 --- a/actions/admin/plugins/disable.php +++ b/actions/admin/plugins/disable.php @@ -18,14 +18,19 @@ // Validate the action action_gatekeeper(); - // Get the user + // Get the plugin $plugin = get_input('plugin'); + if (!is_array($plugin)) + $plugin = array($plugin); - // Disable - if (disable_plugin($plugin)) - system_message(sprintf(elgg_echo('admin:plugins:disable:yes'), $plugin)); - else - register_error(sprintf(elgg_echo('admin:plugins:disable:no'), $plugin)); + foreach ($plugin as $p) + { + // Disable + if (disable_plugin($p)) + system_message(sprintf(elgg_echo('admin:plugins:disable:yes'), $p)); + else + register_error(sprintf(elgg_echo('admin:plugins:disable:no'), $p)); + } elgg_view_regenerate_simplecache();
diff --git a/actions/admin/plugins/enable.php b/actions/admin/plugins/enable.php index 0a9086b91..072924eec 100644 --- a/actions/admin/plugins/enable.php +++ b/actions/admin/plugins/enable.php @@ -18,14 +18,19 @@ // Validate the action action_gatekeeper(); - // Get the user + // Get the plugin $plugin = get_input('plugin'); + if (!is_array($plugin)) + $plugin = array($plugin); - // Disable - if (enable_plugin($plugin)) - system_message(sprintf(elgg_echo('admin:plugins:enable:yes'), $plugin)); - else - register_error(sprintf(elgg_echo('admin:plugins:enable:no'), $plugin)); + foreach ($plugin as $p) + { + // Disable + if (enable_plugin($p)) + system_message(sprintf(elgg_echo('admin:plugins:enable:yes'), $p)); + else + register_error(sprintf(elgg_echo('admin:plugins:enable:no'), $p)); + } elgg_view_regenerate_simplecache();
|