diff options
Diffstat (limited to 'actions')
-rw-r--r-- | actions/admin/plugins/disable.php | 29 | ||||
-rw-r--r-- | actions/admin/plugins/enable.php | 29 |
2 files changed, 58 insertions, 0 deletions
diff --git a/actions/admin/plugins/disable.php b/actions/admin/plugins/disable.php new file mode 100644 index 000000000..6fd85b0eb --- /dev/null +++ b/actions/admin/plugins/disable.php @@ -0,0 +1,29 @@ +<?php + /** + * Disable plugin action. + * + * @package Elgg + * @subpackage Core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Marcus Povey + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + */ + + require_once("../../../engine/start.php"); + + // block non-admin users + admin_gatekeeper(); + + // Get the user + $plugin = get_input('plugin'); + + // Disable + if (disable_plugin($plugin)) + system_message(sprintf(elgg_echo('admin:plugins:disable:yes'), $plugin)); + else + system_message(sprintf(elgg_echo('admin:plugins:disable:no'), $plugin)); + + header("Location: {$CONFIG->wwwroot}admin/plugins/"); + exit; +?>
\ No newline at end of file diff --git a/actions/admin/plugins/enable.php b/actions/admin/plugins/enable.php new file mode 100644 index 000000000..a29ee5694 --- /dev/null +++ b/actions/admin/plugins/enable.php @@ -0,0 +1,29 @@ +<?php + /** + * Enable plugin action. + * + * @package Elgg + * @subpackage Core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Marcus Povey + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + */ + + require_once("../../../engine/start.php"); + + // block non-admin users + admin_gatekeeper(); + + // Get the user + $plugin = get_input('plugin'); + + // Disable + if (enable_plugin($plugin)) + system_message(sprintf(elgg_echo('admin:plugins:enable:yes'), $plugin)); + else + system_message(sprintf(elgg_echo('admin:plugins:enable:no'), $plugin)); + + header("Location: {$CONFIG->wwwroot}admin/plugins/"); + exit; +?>
\ No newline at end of file |