Add appendConf

This commit is contained in:
cmp167
2023-03-28 04:21:20 +12:00
parent 4f6a0b17ed
commit 8329ec125b

View File

@@ -160,16 +160,25 @@
return $obj;
}
function appendConf($arr) {
if(!$arr)
return false;
foreach($arr as $k => $v) {
// $this->d("Set parm .$k to $v");
$this->parm[$k] = $v;
}
return true;
}
function readJSONConf($file) {
$obj = $this->readJSON($file);
if(!$obj)
return false;
foreach($obj as $k => $v) {
// $this->d("Set parm .$k to $v");
$this->parm[$k] = $v;
}
$this->appendConf($obj);
if(@$this->parm["timezone"]) {
$this->d("Set timezone '" . $this->parm["timezone"] . "'");