mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-03 10:02:42 +00:00
Removing support for deprecated .thtml view file extension.
This commit is contained in:
parent
7a3a6966c2
commit
a0feb84789
1 changed files with 4 additions and 10 deletions
|
@ -373,9 +373,6 @@ class View extends Object {
|
||||||
if (file_exists($path . 'elements' . DS . $name . $this->ext)) {
|
if (file_exists($path . 'elements' . DS . $name . $this->ext)) {
|
||||||
$file = $path . 'elements' . DS . $name . $this->ext;
|
$file = $path . 'elements' . DS . $name . $this->ext;
|
||||||
break;
|
break;
|
||||||
} elseif (file_exists($path . 'elements' . DS . $name . '.thtml')) {
|
|
||||||
$file = $path . 'elements' . DS . $name . '.thtml';
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -859,8 +856,6 @@ class View extends Object {
|
||||||
return $path . $name . $this->ext;
|
return $path . $name . $this->ext;
|
||||||
} elseif (file_exists($path . $name . '.ctp')) {
|
} elseif (file_exists($path . $name . '.ctp')) {
|
||||||
return $path . $name . '.ctp';
|
return $path . $name . '.ctp';
|
||||||
} elseif (file_exists($path . $name . '.thtml')) {
|
|
||||||
return $path . $name . '.thtml';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$defaultPath = $paths[0];
|
$defaultPath = $paths[0];
|
||||||
|
@ -895,12 +890,11 @@ class View extends Object {
|
||||||
$paths = $this->_paths(Inflector::underscore($this->plugin));
|
$paths = $this->_paths(Inflector::underscore($this->plugin));
|
||||||
$file = 'layouts' . DS . $subDir . $name;
|
$file = 'layouts' . DS . $subDir . $name;
|
||||||
|
|
||||||
$exts = array($this->ext, '.ctp', '.thtml');
|
|
||||||
foreach ($paths as $path) {
|
foreach ($paths as $path) {
|
||||||
foreach ($exts as $ext) {
|
if (file_exists($path . $file . $this->ext)) {
|
||||||
if (file_exists($path . $file . $ext)) {
|
return $path . $file . $this->ext;
|
||||||
return $path . $file . $ext;
|
} elseif (file_exists($path . $file . '.ctp')) {
|
||||||
}
|
return $path . $file . '.ctp';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $this->_missingView($paths[0] . $file . $this->ext, 'missingLayout');
|
return $this->_missingView($paths[0] . $file . $this->ext, 'missingLayout');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue