diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-16 14:05:47 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-07-16 14:05:47 +0000 |
commit | 228c74feb61186dbaee88bafb5f73a53e568472f (patch) | |
tree | c7d8ccc7235ee6581f00f876cd5e42fb2d55272b | |
parent | 63df0805e22ed657c9e13b64ecab0199070d6622 (diff) | |
download | elgg-228c74feb61186dbaee88bafb5f73a53e568472f.tar.gz elgg-228c74feb61186dbaee88bafb5f73a53e568472f.tar.bz2 |
Closes #158: Renamed $location to $view_location within elgg_view. This seems to be a successful workaround.
git-svn-id: https://code.elgg.org/elgg/trunk@1439 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r-- | engine/lib/elgglib.php | 44 |
1 files changed, 26 insertions, 18 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index da0699cf8..212e20e7a 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -66,6 +66,7 @@ /**
* Templating and visual functionality
*/
+ /**
* Handles templating views
@@ -146,36 +147,43 @@ } else {
$viewlist = array(500 => $view);
}
-
+//error_log("cccccccccccccccccccccccccccccccccc ". $viewtype );
// Start the output buffer, find the requested view file, and execute it
ob_start();
foreach($viewlist as $priority => $view) {
-
+
if (!isset($CONFIG->views->locations[$view])) {
if (!isset($CONFIG->viewpath)) {
- $location = dirname(dirname(dirname(__FILE__))) . "/views/";
+ $view_location = dirname(dirname(dirname(__FILE__))) . "/views/";
} else {
- $location = $CONFIG->viewpath;
+ $view_location = $CONFIG->viewpath;
}
} else {
- $location = $CONFIG->views->locations[$view];
- }
- if (file_exists($location . "{$viewtype}/{$view}.php") && !@include($location . "{$viewtype}/{$view}.php")) {
+ $view_location = $CONFIG->views->locations[$view];
+ } + +//error_log("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ". $view_location . "{$viewtype}/{$view}.php" ); +
+ if (file_exists($view_location . "{$viewtype}/{$view}.php") && !@include($view_location . "{$viewtype}/{$view}.php")) {
$success = false;
if ($viewtype != "default") {
- if (@include($location . "default/{$view}.php")) {
+ if (@include($view_location . "default/{$view}.php")) {
$success = true;
}
}
if (!$success && isset($CONFIG->debug) && $CONFIG->debug == true) {
error_log(" [This view ({$view}) does not exist] ");
}
- } else if (isset($CONFIG->debug) && $CONFIG->debug == true && !file_exists($location . "{$viewtype}/{$view}.php")) {
- error_log($location . "{$viewtype}/{$view}.php");
- error_log(" [This view ({$view}) does not exist] ");
+ } else if (isset($CONFIG->debug) && $CONFIG->debug == true && !file_exists($view_location . "{$viewtype}/{$view}.php")) {
+//error_log("bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb ". $view_location . "{$viewtype}/{$view}.php" ); + + error_log($view_location . "{$viewtype}/{$view}.php");
+ error_log(" [This view ({$view}) does not exist] "); }
-
+ + +
}
// Save the output buffer into the $content variable
@@ -1505,12 +1513,12 @@ * * @return bool */ - function is_privileged() + /*function is_privileged() { global $CONFIG; return call_gatekeeper('execute_privileged_codeblock', $CONFIG->path . 'engine/lib/elgglib.php'); - } + }*/ /** * Execute a function as a privileged user. @@ -1526,7 +1534,7 @@ * @return the result of the executed codeblock * @throws SecurityException */ - function execute_privileged_codeblock($function, array $params = null) + /*function execute_privileged_codeblock($function, array $params = null) { // Test path first if (can_path_execute_privileged_codeblock()) @@ -1548,13 +1556,13 @@ } throw new SecurityException(elgg_echo("SecurityException:Codeblock")); - } + }*/ /** * Validate that a given path has privileges to execute a piece of privileged code. * */ - function can_path_execute_privileged_codeblock() + /*function can_path_execute_privileged_codeblock() { global $CONFIG; @@ -1574,7 +1582,7 @@ } return false; - } + }*/ /**
* Get the full URL of the current page.
|