aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-11 17:28:30 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-11 17:28:30 +0000
commit7be113be2092be8741b31b5a4de428e5e07f5d43 (patch)
tree2cb772b055c7046585ab787e11588f22467c50fd /engine
parent714ccd2989c219b592460d80b0a455baca1a5fd1 (diff)
downloadelgg-7be113be2092be8741b31b5a4de428e5e07f5d43.tar.gz
elgg-7be113be2092be8741b31b5a4de428e5e07f5d43.tar.bz2
Fixes for previous
git-svn-id: https://code.elgg.org/elgg/trunk@169 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine')
-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/");
}
}
}