aboutsummaryrefslogtreecommitdiff
path: root/actions/admin
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-26 17:03:18 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-02-26 17:03:18 +0000
commit014ff8894b7a2aa49b4f0842c212683ea0c15293 (patch)
tree967330634533fd203b485065af08574d6f53d49e /actions/admin
parent2a96f2531b6ce8388ee0c63a335d6c48c5ed5a66 (diff)
downloadelgg-014ff8894b7a2aa49b4f0842c212683ea0c15293.tar.gz
elgg-014ff8894b7a2aa49b4f0842c212683ea0c15293.tar.bz2
enable/disable plugin actions now support arrays as parameters
git-svn-id: https://code.elgg.org/elgg/trunk@2966 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/admin')
-rw-r--r--actions/admin/plugins/disable.php17
-rw-r--r--actions/admin/plugins/enable.php17
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();