aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-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/");
+ }
}
}
}