Merge branch 'revert-39b80d2c' into 'develop'
Revert "fixed IPAM config" See merge request artica/pandorafms!2323 Former-commit-id: 00caaac9361782698f23ae47aad9740927045b0e
This commit is contained in:
commit
b50901bfd3
|
@ -81,6 +81,11 @@ function config_update_value($token, $value)
|
|||
$value = ($value);
|
||||
}
|
||||
|
||||
if (!isset($config[$token])) {
|
||||
$config[$token] = $value;
|
||||
return (bool) config_create_value($token, io_safe_input($value));
|
||||
}
|
||||
|
||||
// If it has not changed.
|
||||
if ($config[$token] == $value) {
|
||||
return true;
|
||||
|
@ -95,18 +100,10 @@ function config_update_value($token, $value)
|
|||
['token' => $token]
|
||||
);
|
||||
|
||||
if ($result == 0) {
|
||||
if ($result === 0) {
|
||||
return true;
|
||||
} else {
|
||||
if (!isset($config[$token])) {
|
||||
$config[$token] = $value;
|
||||
return (bool) config_create_value(
|
||||
$token,
|
||||
io_safe_input($value)
|
||||
);
|
||||
} else {
|
||||
return (bool) $result;
|
||||
}
|
||||
return (bool) $result;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue