aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/plugins.php
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib/plugins.php')
-rw-r--r--engine/lib/plugins.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index b78418243..3cc11f96c 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -185,8 +185,14 @@
if (file_exists($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 . "/views")) {
+ if ($handle = opendir($CONFIG->pluginspath . $mod . "/views")) {
+ while ($viewtype = readdir($handle)) {
+ if (!in_array($viewtype,array('.','..','.svn','CVS')) && is_dir($CONFIG->pluginspath . $mod . "/views/" . $viewtype)) {
+ autoregister_views("",$CONFIG->pluginspath . $mod . "/views/" . $viewtype,$CONFIG->pluginspath . $mod . "/views/", $viewtype);
+ }
+ }
+ }
}
if (is_dir($CONFIG->pluginspath . $mod . "/languages")) {
register_translations($CONFIG->pluginspath . $mod . "/languages/");