diff --git a/cake/libs/view/helpers/cache.php b/cake/libs/view/helpers/cache.php index 67b135b48..419622271 100644 --- a/cake/libs/view/helpers/cache.php +++ b/cake/libs/view/helpers/cache.php @@ -233,7 +233,7 @@ class CacheHelper extends AppHelper { $this->loaded[$camelBackedHelper] = (${$camelBackedHelper}); } ?>' . $file; - return cache('views' . DS . $cache, $file, $timestamp); + return cache('views' . DS . $cache, $file, $timestamp); } } ?> \ No newline at end of file diff --git a/cake/libs/view/view.php b/cake/libs/view/view.php index 78a4b0a3a..d66d8e285 100644 --- a/cake/libs/view/view.php +++ b/cake/libs/view/view.php @@ -366,6 +366,10 @@ class View extends Object { if ($out !== false) { if ($this->layout && $this->autoLayout) { $out = $this->renderLayout($out); + if (isset($this->loaded['cache']) && ((isset($this->controller) && $this->controller->cacheAction != false)) && (defined('CACHE_CHECK') && CACHE_CHECK === true)) { + $replace = array('', ''); + $out = str_replace($replace, '', $out); + } } print $out; @@ -731,8 +735,6 @@ class View extends Object { $cache->cacheAction = $this->controller->cacheAction; $cache->cache($___viewFn, $out, $cached); } - $replace = array('', ''); - $out = str_replace($replace, '', $out); } return $out; @@ -844,8 +846,7 @@ class View extends Object { if($this->layout === 'xml'){ header('Content-type: text/xml'); } - $replace = array('', '', ''); - $out = str_replace($replace, '', $out); + $out = str_replace('', '', $out); e($out); die(); }