fixed IPAM config
Former-commit-id: 39b80d2ca41c21a823cdec5948e30109a81eeb2a
This commit is contained in:
parent
c598eb60fb
commit
1fe1beb930
|
@ -81,11 +81,6 @@ 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;
|
||||
|
@ -100,10 +95,18 @@ function config_update_value($token, $value)
|
|||
['token' => $token]
|
||||
);
|
||||
|
||||
if ($result === 0) {
|
||||
if ($result == 0) {
|
||||
return true;
|
||||
} else {
|
||||
return (bool) $result;
|
||||
if (!isset($config[$token])) {
|
||||
$config[$token] = $value;
|
||||
return (bool) config_create_value(
|
||||
$token,
|
||||
io_safe_input($value)
|
||||
);
|
||||
} else {
|
||||
return (bool) $result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue