From b7bdde1f1867720998af82d51866a839d57e5b7e Mon Sep 17 00:00:00 2001 From: SimonFair <39065407+SimonFair@users.noreply.github.com> Date: Mon, 15 Jan 2024 23:33:42 +0000 Subject: [PATCH] fix clock --- emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php index d07edfe4a..59aa2b6cf 100644 --- a/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php +++ b/emhttp/plugins/dynamix.vm.manager/templates/Custom.form.php @@ -208,6 +208,8 @@ if ($templatename == "") $templatename=$usertemplate['template']['os']; unset($usertemplate['templatename']) ; if (strpos($templatename,"User-") === false) $templatename = "User-".$templatename ; + if (is_array($usertemplate['clock'])) $usertemplate['clocks'] = json_encode($usertemplate['clock']); + unset($usertemplate['clock']); $savedtemplates[$templatename] = [ 'icon' => $usertemplate['template']['icon'], 'form' => 'Custom.form.php', @@ -359,7 +361,7 @@ } else $arrClocks = $arrDefaultClocks['other'] ; } - if (strpos($arrConfig['template']['name'],"User-") !== false) $arrConfig['template']['name'] = str_replace("User-","",$arrConfig['template']['name']) + if (strpos($arrConfig['template']['name'],"User-") !== false) $arrConfig['template']['name'] = str_replace("User-","",$arrConfig['template']['name']); ?>