aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/plugins.php23
1 files changed, 17 insertions, 6 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 51a47601d..b22dec7be 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -55,11 +55,23 @@
global $CONFIG;
if (!empty($CONFIG->pluginspath)) {
+ $plugins = array();
+
if ($handle = opendir($CONFIG->pluginspath)) {
while ($mod = readdir($handle)) {
if (!in_array($mod,array('.','..','.svn','CVS')) && is_dir($CONFIG->pluginspath . "/" . $mod)) {
- if (is_plugin_enabled($mod))
- {
+ if (is_plugin_enabled($mod)) {
+
+ $plugins[] = $mod;
+
+ }
+ }
+ }
+
+ sort($plugins);
+
+ if (sizeof($plugins))
+ foreach($plugins as $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")) {
@@ -67,10 +79,9 @@
}
if (is_dir($CONFIG->pluginspath . $mod . "/languages")) {
register_translations($CONFIG->pluginspath . $mod . "/languages/");
- }
- }
- }
- }
+ }
+ }
+
}
}