Refactoring fix for Ticket #1648

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3949 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2006-11-24 04:41:56 +00:00
parent e42df60a24
commit 54f770ae53
2 changed files with 6 additions and 5 deletions

View file

@ -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);
}
}
?>

View file

@ -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('<cake:nocache>', '</cake:nocache>');
$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('<cake:nocache>', '</cake:nocache>');
$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('<!--cachetime:'.$match['1'].'-->', '<cake:nocache>', '</cake:nocache>');
$out = str_replace($replace, '', $out);
$out = str_replace('<!--cachetime:'.$match['1'].'-->', '', $out);
e($out);
die();
}