aboutsummaryrefslogtreecommitdiff
path: root/actions/admin/plugins/enable.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/admin/plugins/enable.php')
-rw-r--r--actions/admin/plugins/enable.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/actions/admin/plugins/enable.php b/actions/admin/plugins/enable.php
index 053fbc556..0510fafa8 100644
--- a/actions/admin/plugins/enable.php
+++ b/actions/admin/plugins/enable.php
@@ -1,14 +1,16 @@
<?php
/**
- * Enable plugin action.
+ * Enables a plugin or plugins.
*
- * @package Elgg
- * @subpackage Core
- * @author Curverider Ltd
- * @link http://elgg.org/
+ * Plugins to be enabled are passed via $_REQUEST['plugin'] as plugin ID (directory name).
+ * After enabling the plugin(s), the views cache and simplecache are reset.
+ *
+ * @uses mixed $_GET['plugin'] The id (directory name) of the plugin to enable. Can be an array.
+ *
+ * @package Elgg.Core
+ * @subpackage Administration.Site
*/
-// block non-admin users
admin_gatekeeper();
$plugin = get_input('plugin');
@@ -18,7 +20,6 @@ if (!is_array($plugin)) {
}
foreach ($plugin as $p) {
- // Disable
if (enable_plugin($p)) {
elgg_delete_admin_notice('first_installation_plugin_reminder');
system_message(sprintf(elgg_echo('admin:plugins:enable:yes'), $p));
@@ -27,6 +28,7 @@ foreach ($plugin as $p) {
}
}
+// need to reset caches for new view locations and cached view output.
elgg_view_regenerate_simplecache();
elgg_filepath_cache_reset();