mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
updating view again
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6278 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
aa637e1b1d
commit
3b1b182873
1 changed files with 3 additions and 3 deletions
|
@ -778,13 +778,13 @@ class View extends Object {
|
|||
if ($name{0} !== '/' && strpos($name, '..') === false) {
|
||||
$name = $this->viewPath . DS . $subDir . Inflector::underscore($name);
|
||||
} elseif ($name{0} === '/') {
|
||||
if (is_file($name)) {
|
||||
return $name;
|
||||
}
|
||||
$name = trim($name, '/');
|
||||
if (DS !== '/') {
|
||||
$name = implode(DS, explode('/', $name));
|
||||
}
|
||||
if (is_file($name)) {
|
||||
return $name;
|
||||
}
|
||||
} elseif (strpos($name, '..') !== false) {
|
||||
$name = explode('/', $name);
|
||||
$i = array_search('..', $name);
|
||||
|
|
Loading…
Reference in a new issue