From 007330159ed0f6ff612bacde9c8fc1fb1380ce33 Mon Sep 17 00:00:00 2001
From: steve-lad <72376554+steve-lad@users.noreply.github.com>
Date: Sun, 13 Jun 2021 15:39:43 +0200
Subject: [PATCH] Disable TZ selection
TZ is a FreePBX property and should be only changed there.
Now only display for info with help
Ensure that at each initiation, we load the system value
---
Sccp_manager.class.php | 5 +++-
conf/sccpgeneral.xml.v433 | 6 ++---
views/formShow.php | 51 +++++++++------------------------------
3 files changed, 18 insertions(+), 44 deletions(-)
diff --git a/Sccp_manager.class.php b/Sccp_manager.class.php
index 4c92c9b..0cc0ee6 100644
--- a/Sccp_manager.class.php
+++ b/Sccp_manager.class.php
@@ -140,7 +140,6 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
}
$this->sccpvalues = $this->dbinterface->get_db_SccpSetting(); // Overwrite Exist
-// $this->getSccpSetingINI(false); // get from sccep.ini
$this->initializeSccpPath();
$this->initVarfromDefs();
$this->initTftpLang();
@@ -202,6 +201,10 @@ class Sccp_manager extends \FreePBX_Helpers implements \BMO {
$this->sccpvalues[$key] = array('keyword' => $key, 'data' => $value, 'type' => '0', 'seq' => '0');
}
}
+ // Check timezone has not been changed in FreePBX and update if has
+ if ($this->sccpvalues['ntp_timezone'] != \date_default_timezone_get()) {
+ $this->sccpvalues['ntp_timezone'] = array('keyword' => 'ntp_timezone', 'seq'=>95, 'type' => 2, 'data' => \date_default_timezone_get());
+ }
}
/*
diff --git a/conf/sccpgeneral.xml.v433 b/conf/sccpgeneral.xml.v433
index 698f0d6..2334954 100644
--- a/conf/sccpgeneral.xml.v433
+++ b/conf/sccpgeneral.xml.v433
@@ -492,7 +492,7 @@ and open the template in the editor. Base Version before all crash :-)