Add appendConf
This commit is contained in:
17
cmpUtil.php
17
cmpUtil.php
@@ -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"] . "'");
|
||||
|
Reference in New Issue
Block a user