diff --git a/VERSION.txt b/VERSION.txt index 337895caf..8f69b34a9 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -6,4 +6,4 @@ // +---------------------------------------------------------------------------------------------------+ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// -1.0.0.2264 \ No newline at end of file +1.0.0.2266 \ No newline at end of file diff --git a/cake/bootstrap.php b/cake/bootstrap.php index 2d38fb2d8..22fc05aba 100644 --- a/cake/bootstrap.php +++ b/cake/bootstrap.php @@ -114,32 +114,37 @@ if(defined('CACHE_CHECK') && CACHE_CHECK === true) $uri = setUri(); } - $filename = CACHE.'views'.DS.'*'.str_replace('/', '_', $uri).'*'; + $pattern = str_replace('/', '_', $uri); + $filename = CACHE.'views'.DS.'*'.$pattern .'*'; $files = glob($filename); - if(isset($files[0])) + foreach ($files as $file) { - if (file_exists($files[0])) + if (preg_match('/('.$pattern.')(_{0,2}\\d+)/', $file)) { - if (preg_match('/(\\d+).php/', $files[0], $match)) + if (file_exists($file)) { - if(time() >= $match['1']) + if (preg_match('/(\\d+).php/', $file, $match)) { - @unlink($files[0]); - unset($out); - } - else - { - ob_start(); - include($files[0]); - if (DEBUG) + if(time() >= $match['1']) { - echo ""; + @unlink($file); + unset($out); + } + else + { + ob_start(); + include($file); + if (DEBUG) + { + echo ""; + } + $out = ob_get_clean(); + die(e($out)); } - $out = ob_get_clean(); - die(e($out)); } } + break; } } }