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:
daniel 2019-04-02 14:10:00 +02:00
commit b50901bfd3
1 changed files with 7 additions and 10 deletions

View File

@ -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;
}
}