minor fixes to template engine for now

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2018-12-19 20:38:29 +01:00
parent d654b18517
commit adc627ca4e
2 changed files with 4 additions and 3 deletions

View File

@@ -91,6 +91,7 @@ function _checkAndParseTpl($filename) {
// loop through template more than once in case we have an "if"-statement in another one
while (preg_match('/<if[ \t]*(.*)>(.*)(<\/if>|<else>(.*)<\/if>)/Uis', $templatefile)) {
$templatefile = preg_replace('/<if[ \t]*(.*)>(.*)(<\/if>|<else>(.*)<\/if>)/Uis', '".( ($1) ? ("$2") : ("$4") )."', $templatefile);
$templatefile = str_replace('\\\\', '\\', $templatefile);
}
return $templatefile;