Permalink
Browse files

minor refactor for file_exists checks.

  • Loading branch information...
1 parent 2444877 commit ef23ecfe07278fcb9a02fa3fe6a0ca98767ba2d4 @markstory markstory committed Aug 30, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 cake/libs/view/view.php
View
2 cake/libs/view/view.php
@@ -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';
}
}

0 comments on commit ef23ecf

Please sign in to comment.