Fixes:
- don't do $string[position] anymore, use substr() instead - 'extends' was hanging loose there, rewrote it twice to fix parser error Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
parent
0e0fb2b1ee
commit
98b407218d
1 changed files with 3 additions and 3 deletions
|
@ -652,14 +652,14 @@ function get_template_file($a, $filename, $root = '') {
|
|||
$theme = current_theme();
|
||||
|
||||
// Make sure $root ends with a slash /
|
||||
if ($root !== '' && $root[strlen($root) - 1] !== '/') {
|
||||
if ($root !== '' && substr($root, -1, 1) !== '/') {
|
||||
$root = $root . '/';
|
||||
}
|
||||
|
||||
if (file_exists("{$root}view/theme/$theme/$filename")) {
|
||||
$template_file = "{$root}view/theme/$theme/$filename";
|
||||
} elseif (x($a->theme_info, "extends") && file_exists("{$root}view/theme/{$a->theme_info[\"extends\"]}/$filename")) {
|
||||
$template_file = "{$root}view/theme/{$a->theme_info[\"extends\"]}/$filename";
|
||||
} elseif (x($a->theme_info, "extends") && file_exists(sprintf('%sview/theme/%s}/%s', $root, $a->theme_info["extends"], $filename))) {
|
||||
$template_file = sprintf('%sview/theme/%s}/%s', $root, $a->theme_info["extends"], $filename);
|
||||
} elseif (file_exists("{$root}/$filename")) {
|
||||
$template_file = "{$root}/$filename";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue