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:
gwoo 2007-12-29 21:10:41 +00:00
parent aa637e1b1d
commit 3b1b182873

View file

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