aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php9
-rw-r--r--engine/lib/plugins.php2
2 files changed, 8 insertions, 3 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 973de2680..cb1651f40 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -56,6 +56,7 @@
global $CONFIG, $strings;
static $usercache;
+
if (!is_array($usercache)) {
$usercache = array();
}
@@ -112,6 +113,7 @@
}
if (file_exists($location . "{$viewtype}/{$view}.php") && !@include($location . "{$viewtype}/{$view}.php")) {
$success = false;
+
if ($viewtype != "default") {
if (@include($location . "default/{$view}.php")) {
$success = true;
@@ -121,6 +123,7 @@
echo " [This view ({$view}) does not exist] ";
}
} else if ($CONFIG->debug == true) {
+ echo $location . "{$viewtype}/{$view}.php";
echo " [This view ({$view}) does not exist] ";
}
@@ -192,10 +195,12 @@
while ($view = readdir($handle)) {
if (!in_array($view,array('.','..','.svn','CVS')) && !is_dir($folder . "/" . $view)) {
if (substr_count($view,".php") > 0) {
- set_view_location($view_base . "/" . str_replace(".php","",$view), $base_location_path);
+ if (!empty($view_base)) { $view_base_new = $view_base . "/"; } else { $view_base_new = ""; }
+ set_view_location($view_base_new . str_replace(".php","",$view), $base_location_path);
}
} else if (!in_array($view,array('.','..','.svn','CVS')) && is_dir($folder . "/" . $view)) {
- autoregister_views($view_base . "/" . $view, $folder . "/" . $view, $base_location_path);
+ if (!empty($view_base)) { $view_base_new = $view_base . "/"; } else { $view_base_new = ""; }
+ autoregister_views($view_base_new . $view, $folder . "/" . $view, $base_location_path);
}
}
}
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index 92294faea..447be32af 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -29,7 +29,7 @@
if (!@include($CONFIG->pluginspath . $mod . "/start.php"))
throw new PluginException("{$mod} is a misconfigured plugin.");
if (is_dir($CONFIG->pluginspath . $mod . "/views/default")) {
- autoregister_views($mod,$CONFIG->pluginspath . $mod . "/views/default",$CONFIG->pluginspath . $mod . "/views");
+ autoregister_views("",$CONFIG->pluginspath . $mod . "/views/default",$CONFIG->pluginspath . $mod . "/views/");
}
}
}