aboutsummaryrefslogtreecommitdiff
path: root/actions/admin/plugins/enable.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-20 15:11:42 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-20 15:11:42 +0000
commit44fedcf732370708395227b3fd89cb336389ec8e (patch)
tree8b9debc278f1770f52a79a42c595abdcd02e7513 /actions/admin/plugins/enable.php
parent2953dea01d0e6e01688b18627c384fddb637e8e1 (diff)
downloadelgg-44fedcf732370708395227b3fd89cb336389ec8e.tar.gz
elgg-44fedcf732370708395227b3fd89cb336389ec8e.tar.bz2
Closes #20: Plugin management and config panel
http://trac.elgg.org/elgg/ticket/20 git-svn-id: https://code.elgg.org/elgg/trunk@1027 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/admin/plugins/enable.php')
-rw-r--r--actions/admin/plugins/enable.php29
1 files changed, 29 insertions, 0 deletions
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