aboutsummaryrefslogtreecommitdiff
path: root/actions/admin/plugins/disable.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/admin/plugins/disable.php')
-rw-r--r--actions/admin/plugins/disable.php17
1 files changed, 11 insertions, 6 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();