minor fixes to template engine for now
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -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'];
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user