From da7dbb5d2d72d146dfdac71382afb63f2038432e Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 2 Apr 2011 02:04:54 +0000 Subject: 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 --- actions/admin/plugins/activate.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'actions/admin/plugins/activate.php') 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); -- cgit v1.2.3