diff options
Diffstat (limited to 'actions/admin/plugins/disable.php')
-rw-r--r-- | actions/admin/plugins/disable.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/actions/admin/plugins/disable.php b/actions/admin/plugins/disable.php index ac80d46e3..3207e6800 100644 --- a/actions/admin/plugins/disable.php +++ b/actions/admin/plugins/disable.php @@ -1,24 +1,24 @@ <?php /** - * Disable plugin action. + * Disable a plugin or plugins. * - * @package Elgg - * @subpackage Core - * @author Curverider Ltd - * @link http://elgg.org/ + * Plugins to be disabled are passed via $_REQUEST['plugin'] as plugin ID (directory name). + * After disabling the plugin(s), the views cache and simplecache are both reset. + * + * @uses mixed $_GET['plugin'] The id (directory name) of the plugin to disable. Can be an array. + * + * @package Elgg.Core + * @subpackage Administration.Site */ -// block non-admin users admin_gatekeeper(); -// Get the plugin $plugin = get_input('plugin'); if (!is_array($plugin)) { $plugin = array($plugin); } foreach ($plugin as $p) { - // Disable if (disable_plugin($p)) { system_message(sprintf(elgg_echo('admin:plugins:disable:yes'), $p)); elgg_delete_admin_notice('first_installation_plugin_reminder'); @@ -27,6 +27,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(); |