mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
b8a46e14d7
commit
1490f7da5d
1 changed files with 5 additions and 6 deletions
|
@ -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 {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in a new issue