aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/plugins.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-20 11:52:39 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-06-20 11:52:39 +0000
commit801eeb2cf9b1417a3bc8f25f1eec33cb9204be22 (patch)
tree604af886f88373ba290a2d269c6ccf3746c185ab /engine/lib/plugins.php
parent9b47cfa886a391296641dad6509f92c17fdc572d (diff)
downloadelgg-801eeb2cf9b1417a3bc8f25f1eec33cb9204be22.tar.gz
elgg-801eeb2cf9b1417a3bc8f25f1eec33cb9204be22.tar.bz2
Actually closes #60: Enable/disable plugins on a site by site basis
http://trac.elgg.org/elgg/ticket/60 git-svn-id: https://code.elgg.org/elgg/trunk@1018 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/plugins.php')
-rw-r--r--engine/lib/plugins.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 8ead863a1..0edf46bfb 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -57,14 +57,17 @@
if ($handle = opendir($CONFIG->pluginspath)) {
while ($mod = readdir($handle)) {
- if (!in_array($mod,array('.','..','.svn','CVS')) && is_dir($CONFIG->pluginspath . "/" . $mod)) {
- if (!@include($CONFIG->pluginspath . $mod . "/start.php"))
- throw new PluginException(sprintf(elgg_echo('PluginException:MisconfiguredPlugin'), $mod));
- if (is_dir($CONFIG->pluginspath . $mod . "/views/default")) {
- autoregister_views("",$CONFIG->pluginspath . $mod . "/views/default",$CONFIG->pluginspath . $mod . "/views/");
- }
- if (is_dir($CONFIG->pluginspath . $mod . "/languages")) {
- register_translations($CONFIG->pluginspath . $mod . "/languages/");
+ if (!in_array($mod,array('.','..','.svn','CVS')) && is_dir($CONFIG->pluginspath . "/" . $mod)) {
+ if (is_plugin_enabled($mod))
+ {
+ if (!@include($CONFIG->pluginspath . $mod . "/start.php"))
+ throw new PluginException(sprintf(elgg_echo('PluginException:MisconfiguredPlugin'), $mod));
+ if (is_dir($CONFIG->pluginspath . $mod . "/views/default")) {
+ autoregister_views("",$CONFIG->pluginspath . $mod . "/views/default",$CONFIG->pluginspath . $mod . "/views/");
+ }
+ if (is_dir($CONFIG->pluginspath . $mod . "/languages")) {
+ register_translations($CONFIG->pluginspath . $mod . "/languages/");
+ }
}
}
}