aboutsummaryrefslogtreecommitdiff
path: root/simplecache/view.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-01 15:23:12 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-10-01 15:23:12 +0000
commit093829d05302ece390cc4ec05ae26948eced81de (patch)
treee2cb55647f6b55d0610da657311030394bb674fa /simplecache/view.php
parentcc83297cd4d80f67dd34e5ccc05d305158d9092b (diff)
downloadelgg-093829d05302ece390cc4ec05ae26948eced81de.tar.gz
elgg-093829d05302ece390cc4ec05ae26948eced81de.tar.bz2
Fixes #2504. Renamed $view to $view_name in simplecache/view.php to avoid var name collision with engine/start.php's $view.
git-svn-id: http://code.elgg.org/elgg/trunk@6994 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'simplecache/view.php')
-rw-r--r--simplecache/view.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/simplecache/view.php b/simplecache/view.php
index 1f4aad018..f04ca0118 100644
--- a/simplecache/view.php
+++ b/simplecache/view.php
@@ -23,7 +23,7 @@ if (!isset($viewinput)) {
}
if ($mysql_dblink = @mysql_connect($CONFIG->dbhost,$CONFIG->dbuser,$CONFIG->dbpass, true)) {
- $view = $viewinput['view'];
+ $view_name = $viewinput['view'];
$viewtype = $viewinput['viewtype'];
if (empty($viewtype)) {
$viewtype = 'default';
@@ -48,7 +48,7 @@ if ($mysql_dblink = @mysql_connect($CONFIG->dbhost,$CONFIG->dbuser,$CONFIG->dbpa
}
if ($simplecache_enabled || $override) {
- $filename = $dataroot . 'views_simplecache/' . md5($viewtype . $view);
+ $filename = $dataroot . 'views_simplecache/' . md5($viewtype . $view_name);
if (file_exists($filename)) {
$contents = file_get_contents($filename);
header("Content-Length: " . strlen($contents));
@@ -60,7 +60,7 @@ if ($mysql_dblink = @mysql_connect($CONFIG->dbhost,$CONFIG->dbuser,$CONFIG->dbpa
} else {
mysql_close($mysql_dblink);
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
- $contents = elgg_view($view);
+ $contents = elgg_view($view_name);
header("Content-Length: " . strlen($contents));
}
}
@@ -70,4 +70,4 @@ $split_output = str_split($contents, 1024);
foreach($split_output as $chunk) {
echo $chunk;
-} \ No newline at end of file
+}