diff options
author | robocoder <anthon.pang@gmail.com> | 2009-07-08 08:19:14 +0400 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2009-07-08 08:19:14 +0400 |
commit | 4fb541d1bb1b2bed65142ee2ec98a4a554001165 (patch) | |
tree | 2681dc3b6ee7393c03dca36359a9c9bb8c22d63c /core/CacheFile.php | |
parent | 0cc45658c8f23e14dceb663037f512d47ea4e506 (diff) |
fixes #803 - remove unnecessary require_once from core, plugins, and parts of
libs. (I didn't touch: open-flash-chart, Zend Framework, and PEAR HTML.)
git-svn-id: http://dev.piwik.org/svn/trunk@1296 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/CacheFile.php')
-rw-r--r-- | core/CacheFile.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/CacheFile.php b/core/CacheFile.php index 83b276239d..8cd42b4aed 100644 --- a/core/CacheFile.php +++ b/core/CacheFile.php @@ -24,8 +24,7 @@ class Piwik_CacheFile function __construct($directory) { - $this->cachePath = PIWIK_INCLUDE_PATH . "/tmp/cache/"; - $this->cachePath .= $directory . "/"; + $this->cachePath = PIWIK_INCLUDE_PATH . '/tmp/cache/' . $directory . '/'; // echo $this->cachePath;exit; } @@ -41,7 +40,7 @@ class Piwik_CacheFile $content = ''; // We are assuming that most of the time cache will exists - $ok = @include($this->cachePath . $id . ".php"); + $ok = @include($this->cachePath . $id . '.php'); if ($ok && $cache_complete == true) { return $content; @@ -67,7 +66,7 @@ class Piwik_CacheFile return false; } - $id = $this->cachePath . $id . ".php"; + $id = $this->cachePath . $id . '.php'; $cache_literal = "<"."?php\n\n"; $cache_literal .= "$"."content = ".var_export($content, true).";\n\n"; @@ -95,7 +94,6 @@ class Piwik_CacheFile return false; } - /** * A function to delete a single cache entry * @@ -104,7 +102,7 @@ class Piwik_CacheFile */ function delete($id) { - $filename = $this->cachePath . $id . ".php"; + $filename = $this->cachePath . $id . '.php'; if (file_exists($filename)) { @unlink ($filename); return true; |