Commit fd41613a by Seldaek

* Fixes upgrade issue from old classpath cache files

git-svn-id: svn://dwoo.org/dwoo/trunk@174 0598d79b-80c4-4d41-97ba-ac86fbbd088b
parent eeef80e6
......@@ -53,11 +53,11 @@ class Dwoo_Loader implements Dwoo_ILoader
$this->cacheDir = $cacheDir . DIRECTORY_SEPARATOR;
// include class paths or rebuild paths if the cache file isn't there
$foo = @file_get_contents($this->cacheDir.'classpath.cache.php');
$foo = @file_get_contents($this->cacheDir.'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php');
if ($foo) {
$this->classPath = unserialize($foo) + $this->classPath;
} else {
$this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir.'classpath.cache.php');
$this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir.'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php');
}
}
......@@ -106,7 +106,7 @@ class Dwoo_Loader implements Dwoo_ILoader
// a new class was added or the include failed so we rebuild the cache
if (!isset($this->classPath[$class]) || !(include $this->classPath[$class])) {
if ($forceRehash) {
$this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir . 'classpath.cache.php');
$this->rebuildClassPathCache($this->corePluginDir, $this->cacheDir . 'classpath.cache.d'.Dwoo::RELEASE_TAG.'.php');
foreach ($this->paths as $path=>$file) {
$this->rebuildClassPathCache($path, $file);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment