keep original template filename for the possible error message to show the correct file that was not found

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-11-29 08:22:36 +01:00
parent b0d1290e66
commit cf7c11a106

View File

@@ -49,13 +49,13 @@ function getTemplate($template, $noarea = 0) {
if ($templatefile == false && $theme != $fallback_theme) { if ($templatefile == false && $theme != $fallback_theme) {
// check fallback // check fallback
$filename = './templates/' . $fallback_theme . '/' . $template . '.tpl'; $_filename = './templates/' . $fallback_theme . '/' . $template . '.tpl';
$templatefile = _checkAndParseTpl($filename); $templatefile = _checkAndParseTpl($_filename);
if ($templatefile == false) { if ($templatefile == false) {
// check for old layout // check for old layout
$filename = './templates/' . $template . '.tpl'; $_filename = './templates/' . $template . '.tpl';
$templatefile = _checkAndParseTpl($filename); $templatefile = _checkAndParseTpl($_filename);
if ($templatefile == false) { if ($templatefile == false) {
// not found // not found