Merge branch 'ent-3715-Pete_sql_en_mr_del_ipam' into 'develop'

fixed IPAM config

See merge request artica/pandorafms!2274

Former-commit-id: 95786e5f3fa31e8d8c663ee8f3488336c59d9b3c
This commit is contained in:
Alejandro Fraguas 2019-04-02 09:41:02 +02:00
commit 2461f826ce
1 changed files with 10 additions and 7 deletions

View File

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