Fix bug when updating ACL IP list

This commit is contained in:
alejandro-campos 2019-12-13 14:17:25 +01:00
parent 1bc246742d
commit d30c2c9b3b
1 changed files with 9 additions and 8 deletions

View File

@ -1911,14 +1911,6 @@ function config_process_config()
* Parse the ACL IP list for access API * Parse the ACL IP list for access API
*/ */
$temp_list_ACL_IPs_for_API = [];
if (isset($config['list_ACL_IPs_for_API'])) {
if (!empty($config['list_ACL_IPs_for_API'])) {
$temp_list_ACL_IPs_for_API = explode(';', $config['list_ACL_IPs_for_API']);
}
}
$config['list_ACL_IPs_for_API'] = $temp_list_ACL_IPs_for_API;
$keysConfig = array_keys($config); $keysConfig = array_keys($config);
/* /*
@ -2976,6 +2968,15 @@ function config_process_config()
// Finally, check if any value was overwritten in a form. // Finally, check if any value was overwritten in a form.
config_update_config(); config_update_config();
$temp_list_ACL_IPs_for_API = [];
if (isset($config['list_ACL_IPs_for_API'])) {
if (!empty($config['list_ACL_IPs_for_API'])) {
$temp_list_ACL_IPs_for_API = explode(';', $config['list_ACL_IPs_for_API']);
}
}
$config['list_ACL_IPs_for_API'] = $temp_list_ACL_IPs_for_API;
} }