View::layoutPath fix

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4102 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2006-12-13 05:50:32 +00:00
parent b8a46e14d7
commit 1490f7da5d

View file

@ -551,7 +551,7 @@ class View extends Object {
function _getViewFileName($action) {
$action = Inflector::underscore($action);
$paths = Configure::getInstance();
if (!is_null($this->webservices)) {
$type = strtolower($this->webservices) . DS;
} else {
@ -641,10 +641,10 @@ class View extends Object {
$paths = Configure::getInstance();
foreach($paths->viewPaths as $path) {
if (file_exists($path . 'layouts' . DS . $this->subDir . $this->layoutPath . $type . $this->layout . $this->ext)) {
return $path . 'layouts' . DS . $this->subDir . $this->layoutPath . $type . $this->layout . $this->ext;
} elseif (file_exists($path . 'layouts' . DS . $this->subDir . $this->layoutPath . $type . $this->layout . '.thtml')) {
return $path . 'layouts' . DS . $this->subDir . $this->layoutPath . $type . $this->layout . '.thtml';
if (file_exists($path . 'layouts' . DS . $this->subDir . $type . $this->layout . $this->ext)) {
return $path . 'layouts' . DS . $this->subDir . $type . $this->layout . $this->ext;
} elseif (file_exists($path . 'layouts' . DS . $this->subDir . $type . $this->layout . '.thtml')) {
return $path . 'layouts' . DS . $this->subDir . $type . $this->layout . '.thtml';
}
}
@ -867,5 +867,4 @@ class View extends Object {
}
}
}
?>