Browse files

Removing support for deprecated .thtml view file extension.

  • Loading branch information...
1 parent 7a3a696 commit a0feb84789f77c4b410642d7263f2f1697e3fb79 @markstory markstory committed Aug 22, 2009
Showing with 4 additions and 10 deletions.
  1. +4 −10 cake/libs/view/view.php
View
14 cake/libs/view/view.php
@@ -373,9 +373,6 @@ function element($name, $params = array(), $loadHelpers = false) {
if (file_exists($path . 'elements' . DS . $name . $this->ext)) {
$file = $path . 'elements' . DS . $name . $this->ext;
break;
- } elseif (file_exists($path . 'elements' . DS . $name . '.thtml')) {
- $file = $path . 'elements' . DS . $name . '.thtml';
- break;
}
}
@@ -859,8 +856,6 @@ function _getViewFileName($name = null) {
return $path . $name . $this->ext;
} elseif (file_exists($path . $name . '.ctp')) {
return $path . $name . '.ctp';
- } elseif (file_exists($path . $name . '.thtml')) {
- return $path . $name . '.thtml';
}
}
$defaultPath = $paths[0];
@@ -895,12 +890,11 @@ function _getLayoutFileName($name = null) {
$paths = $this->_paths(Inflector::underscore($this->plugin));
$file = 'layouts' . DS . $subDir . $name;
- $exts = array($this->ext, '.ctp', '.thtml');
foreach ($paths as $path) {
- foreach ($exts as $ext) {
- if (file_exists($path . $file . $ext)) {
- return $path . $file . $ext;
- }
+ if (file_exists($path . $file . $this->ext)) {
+ return $path . $file . $this->ext;
+ } elseif (file_exists($path . $file . '.ctp')) {
+ return $path . $file . '.ctp';
}
}
return $this->_missingView($paths[0] . $file . $this->ext, 'missingLayout');

0 comments on commit a0feb84

Please sign in to comment.