minor refactor for file_exists checks.

This commit is contained in:
mark_story 2009-08-30 18:59:07 -04:00
parent 24448775c2
commit ef23ecfe07

View file

@ -854,7 +854,7 @@ class View extends Object {
foreach ($paths as $path) {
if (file_exists($path . $name . $this->ext)) {
return $path . $name . $this->ext;
} elseif (file_exists($path . $name . '.ctp')) {
} elseif ($this->ext != '.ctp' && file_exists($path . $name . '.ctp')) {
return $path . $name . '.ctp';
}
}