2011-11-25 Sergio Martin <sergio.martin@artica.es>
* include/functions_config.php: Fixed API IP list of access entities bug git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5169 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
739dfdcf0a
commit
d8035b6f0f
|
@ -1,3 +1,8 @@
|
|||
2011-11-25 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_config.php: Fixed API IP list of
|
||||
access entities bug
|
||||
|
||||
2011-11-24 Sergio Martin <sergio.martin@artica.es>
|
||||
|
||||
* include/functions_api.php
|
||||
|
|
|
@ -46,19 +46,9 @@ function config_update_value ($token, $value) {
|
|||
|
||||
switch ($token) {
|
||||
case 'list_ACL_IPs_for_API':
|
||||
switch ($config["dbtype"]) {
|
||||
case "mysql":
|
||||
$rows = db_get_all_rows_sql('SELECT id_config
|
||||
FROM tconfig
|
||||
WHERE token LIKE "%list_ACL_IPs_for_API_%"');
|
||||
break;
|
||||
case "postgresql":
|
||||
case "oracle":
|
||||
$rows = db_get_all_rows_sql("SELECT id_config
|
||||
FROM tconfig
|
||||
WHERE token LIKE '%list_ACL_IPs_for_API_%'");
|
||||
break;
|
||||
}
|
||||
$rows = db_get_all_rows_sql("SELECT id_config
|
||||
FROM tconfig
|
||||
WHERE token LIKE '%list_ACL_IPs_for_API_%'");
|
||||
|
||||
if ($rows !== false) {
|
||||
foreach ($rows as $row)
|
||||
|
@ -67,6 +57,8 @@ function config_update_value ($token, $value) {
|
|||
db_process_sql_delete('tconfig', 'id_config IN (' . implode(',', $idListACLofIP) . ')' );
|
||||
}
|
||||
|
||||
$value = io_safe_output($value);
|
||||
|
||||
if (strpos($value, "\r\n") !== false)
|
||||
$ips = explode("\r\n", $value);
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue