mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
reverting previous changes and updating view, fixes #3785
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6279 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
3b1b182873
commit
a1198bb3b7
1 changed files with 9 additions and 5 deletions
|
@ -775,13 +775,17 @@ class View extends Object {
|
|||
$name = $this->action;
|
||||
}
|
||||
|
||||
if ($name{0} !== '/' && strpos($name, '..') === false) {
|
||||
if (strpos($name, '/') === false && strpos($name, '..') === false) {
|
||||
$name = $this->viewPath . DS . $subDir . Inflector::underscore($name);
|
||||
} elseif ($name{0} === '/') {
|
||||
if (is_file($name)) {
|
||||
return $name;
|
||||
} elseif (strpos($name, '/') !== false) {
|
||||
if ($name{0} === '/') {
|
||||
if (is_file($name)) {
|
||||
return $name;
|
||||
}
|
||||
$name = trim($name, '/');
|
||||
} else {
|
||||
$name = $this->viewPath . DS . $subDir . $name;
|
||||
}
|
||||
$name = trim($name, '/');
|
||||
if (DS !== '/') {
|
||||
$name = implode(DS, explode('/', $name));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue