mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 09:15:15 +02:00
Fixed all issues
This commit is contained in:
parent
92d654763f
commit
cf1c460a9d
@ -149,19 +149,35 @@ class ExternalTools extends HTML
|
|||||||
$external_tools_config['dig_path'] = $this->pathDig;
|
$external_tools_config['dig_path'] = $this->pathDig;
|
||||||
$external_tools_config['snmpget_path'] = $this->pathSnmpget;
|
$external_tools_config['snmpget_path'] = $this->pathSnmpget;
|
||||||
|
|
||||||
|
$otherParameters = [];
|
||||||
|
$otherParameters['sound_alert'] = (string) get_parameter('sound_alert');
|
||||||
|
$otherParameters['sound_critical'] = (string) get_parameter('sound_critical');
|
||||||
|
$otherParameters['sound_warning'] = (string) get_parameter('sound_warning');
|
||||||
|
$otherParameters['graphviz_bin_dir'] = (string) get_parameter('graphviz_bin_dir');
|
||||||
|
|
||||||
if (empty($this->pathCustomComm) === false) {
|
if (empty($this->pathCustomComm) === false) {
|
||||||
$external_tools_config['custom_commands'] = $this->pathCustomComm;
|
$external_tools_config['custom_commands'] = $this->pathCustomComm;
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = config_update_value(
|
foreach ($otherParameters as $keyParam => $valueParam) {
|
||||||
'external_tools_config',
|
$result = config_update_value($keyParam, $valueParam);
|
||||||
json_encode($external_tools_config)
|
|
||||||
);
|
if ($result === false) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($result === true) {
|
||||||
|
$result = config_update_value(
|
||||||
|
'external_tools_config',
|
||||||
|
json_encode($external_tools_config)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
ui_print_result_message(
|
ui_print_result_message(
|
||||||
$result,
|
($result),
|
||||||
__('Set the paths.'),
|
__('Changes successfully saved.'),
|
||||||
__('Set the paths.')
|
__('Changes not saved.')
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
if (isset($config['external_tools_config']) === true) {
|
if (isset($config['external_tools_config']) === true) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user