aboutsummaryrefslogtreecommitdiff
path: root/simplecache/view.php
diff options
context:
space:
mode:
Diffstat (limited to 'simplecache/view.php')
-rw-r--r--simplecache/view.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/simplecache/view.php b/simplecache/view.php
index 826288c29..99f40c141 100644
--- a/simplecache/view.php
+++ b/simplecache/view.php
@@ -47,16 +47,17 @@
if ($simplecache_enabled || $override) {
$filename = $dataroot . 'views_simplecache/' . md5($viewtype . $view);
- if (file_exists($filename))
- $contents = @file_get_contents($filename);
- else {
+ if (file_exists($filename)) {
+ $contents = file_get_contents($filename);
+ header("Content-Length: " . strlen($contents));
+ } else {
echo ''; exit;
}
} else {
mysql_close($mysql_dblink);
require_once(dirname(dirname(__FILE__)) . "/engine/start.php");
$contents = elgg_view($view);
- //header("Content-Length: " . strlen($contents));
+ header("Content-Length: " . strlen($contents));
}
}
}