From adc627ca4eb6c9926dcac7e9d83ba75c2799b6de Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Wed, 19 Dec 2018 20:38:29 +0100 Subject: [PATCH] minor fixes to template engine for now Signed-off-by: Michael Kaufmann --- index.php | 6 +++--- lib/functions/output/function.getTemplate.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 92fae9e9..1236550d 100644 --- a/index.php +++ b/index.php @@ -153,13 +153,13 @@ if ($action == '2fa_entercode') { } } - if ((hasUpdates($version) || hasDbUpdates($dbversion)) && $is_admin == false) { + if ((\Froxlor\Froxlor::hasUpdates() || \Froxlor\Froxlor::hasDbUpdates()) && $is_admin == false) { redirectTo('index.php'); exit(); } if ($is_admin) { - if (hasUpdates($version) || hasDbUpdates($dbversion)) { + if (\Froxlor\Froxlor::hasUpdates() || \Froxlor\Froxlor::hasDbUpdates()) { $stmt = Database::prepare("SELECT `loginname` AS `admin` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `loginname`= :loginname AND `change_serversettings` = '1'"); @@ -364,7 +364,7 @@ if ($action == '2fa_entercode') { } $update_in_progress = ''; - if (hasUpdates($version) || hasDbUpdates($dbversion)) { + if (\Froxlor\Froxlor::hasUpdates() || \Froxlor\Froxlor::hasDbUpdates()) { $update_in_progress = $lng['update']['updateinprogress_onlyadmincanlogin']; } diff --git a/lib/functions/output/function.getTemplate.php b/lib/functions/output/function.getTemplate.php index 291c77cf..7fa6d655 100644 --- a/lib/functions/output/function.getTemplate.php +++ b/lib/functions/output/function.getTemplate.php @@ -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>|(.*)<\/if>)/Uis', $templatefile)) { $templatefile = preg_replace('/(.*)(<\/if>|(.*)<\/if>)/Uis', '".( ($1) ? ("$2") : ("$4") )."', $templatefile); + $templatefile = str_replace('\\\\', '\\', $templatefile); } return $templatefile;