aboutsummaryrefslogtreecommitdiff
path: root/actions/admin
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-02 02:04:54 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-04-02 02:04:54 +0000
commitda7dbb5d2d72d146dfdac71382afb63f2038432e (patch)
tree70205ae956d222ef254ca25c5841519d2fa852be /actions/admin
parent06b07bb28ed7d72b682b217d4637865b257f566c (diff)
downloadelgg-da7dbb5d2d72d146dfdac71382afb63f2038432e.tar.gz
elgg-da7dbb5d2d72d146dfdac71382afb63f2038432e.tar.bz2
Refs #3229 at least we can forward so that user sees error message immediately
git-svn-id: http://code.elgg.org/elgg/trunk@8903 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/admin')
-rw-r--r--actions/admin/plugins/activate.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/actions/admin/plugins/activate.php b/actions/admin/plugins/activate.php
index ad588f3db..0d930b27f 100644
--- a/actions/admin/plugins/activate.php
+++ b/actions/admin/plugins/activate.php
@@ -17,6 +17,7 @@ if (!is_array($plugin_guids)) {
$plugin_guids = array($plugin_guids);
}
+$activated_guids = array();
foreach ($plugin_guids as $guid) {
$plugin = get_entity($guid);
@@ -26,18 +27,18 @@ foreach ($plugin_guids as $guid) {
}
if ($plugin->activate()) {
- //system_message(elgg_echo('admin:plugins:activate:yes', array($plugin->manifest->getName())));
+ $activated_guids[] = $guid;
} else {
register_error(elgg_echo('admin:plugins:activate:no', array($plugin->manifest->getName())));
}
}
// don't regenerate the simplecache because the plugin won't be
-// loaded until next run. Just invalidate and let it regnerate as needed
+// loaded until next run. Just invalidate and let it regenerate as needed
elgg_invalidate_simplecache();
elgg_filepath_cache_reset();
-if (count($plugin_guids) == 1) {
+if (count($activated_guids) === 1) {
forward("admin/plugins/advanced#elgg-plugin-" . $plugin_guids[0]);
} else {
forward(REFERER);