Skip to content

Commit

Permalink
minor refactor for file_exists checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 30, 2009
1 parent 2444877 commit ef23ecf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cake/libs/view/view.php
Expand Up @@ -854,7 +854,7 @@ function _getViewFileName($name = null) {
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';
}
}
Expand Down

0 comments on commit ef23ecf

Please sign in to comment.