Fix find settings
This commit is contained in:
@@ -614,8 +614,6 @@ wrenchboard=#
|
||||
}
|
||||
|
||||
protected function getSettings($settingkey, $defaultVal=''){
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$in = json_decode($raw_json, true);
|
||||
$out=[];
|
||||
$endpoint = "SETTINGS";
|
||||
$out = $this->getCache($endpoint);
|
||||
@@ -629,7 +627,12 @@ wrenchboard=#
|
||||
|
||||
if (is_array($out) && count($out['result_list']) > 0 ) {
|
||||
$this->allSettings = $out['result_list'];
|
||||
return (isset($out['result_list'][$settingkey])) ? $out['result_list'][$settingkey]: $defaultVal;
|
||||
foreach ($this->allSettings as $index => $item) {
|
||||
if ($item['name'] == $settingkey){
|
||||
return $item['val'];
|
||||
}
|
||||
}
|
||||
// return (isset($out['result_list'][$settingkey])) ? $out['result_list'][$settingkey]: $defaultVal;
|
||||
}
|
||||
return $defaultVal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user