aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/plugins.php
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-28 16:01:53 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-10-28 16:01:53 +0000
commit225e17002545e9965f959918d4ac804a5004e9ad (patch)
tree1556750c1ea1b5a9ceed8d2b6605fc7239246f4c /engine/lib/plugins.php
parentb8192c6349d9b5b3293099d06ee1eb239dd7b9fd (diff)
downloadelgg-225e17002545e9965f959918d4ac804a5004e9ad.tar.gz
elgg-225e17002545e9965f959918d4ac804a5004e9ad.tar.bz2
Views are now more granular.
git-svn-id: https://code.elgg.org/elgg/trunk@2331 36083f99-b078-4883-b0ff-0f9b5a30f544
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/");