mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-25 14:54:52 +02:00
2012-06-08 Junichi Satoh <junichi@rworks.jp>
* include/functions_config.php, godmode/setup/setup.php: Fixed that ACL with API access cannot be removed after once configured. (Merged from 4.0.2) Fixed multiple recording of list_ACL_IPs_for_API. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6451 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
26aa9f5400
commit
e899a68a77
@ -1,3 +1,10 @@
|
|||||||
|
2012-06-08 Junichi Satoh <junichi@rworks.jp>
|
||||||
|
|
||||||
|
* include/functions_config.php, godmode/setup/setup.php: Fixed that
|
||||||
|
ACL with API access cannot be removed after once configured. (Merged
|
||||||
|
from 4.0.2)
|
||||||
|
Fixed multiple recording of list_ACL_IPs_for_API.
|
||||||
|
|
||||||
2012-06-07 Miguel de Dios <miguel.dedios@artica.es>
|
2012-06-07 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* godmode/reporting/visual_console_builder.wizard.php,
|
* godmode/reporting/visual_console_builder.wizard.php,
|
||||||
|
@ -120,7 +120,12 @@ $table->data[14][0] = __('Attachment store') . ui_print_help_tip (__("Directory
|
|||||||
$table->data[14][1] = html_print_input_text ('attachment_store', $config["attachment_store"], '', 50, 255, true);
|
$table->data[14][1] = html_print_input_text ('attachment_store', $config["attachment_store"], '', 50, 255, true);
|
||||||
|
|
||||||
$table->data[15][0] = __('IP list with API access') . ui_print_help_icon ("ip_api_list", true);
|
$table->data[15][0] = __('IP list with API access') . ui_print_help_icon ("ip_api_list", true);
|
||||||
$list_ACL_IPs_for_API = get_parameter('list_ACL_IPs_for_API', implode("\n", $config['list_ACL_IPs_for_API']));
|
if (isset($_POST["list_ACL_IPs_for_API"])) {
|
||||||
|
$list_ACL_IPs_for_API = get_parameter_post('list_ACL_IPs_for_API');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$list_ACL_IPs_for_API = get_parameter_get('list_ACL_IPs_for_API', implode("\n", $config['list_ACL_IPs_for_API']));
|
||||||
|
}
|
||||||
$table->data[15][1] = html_print_textarea('list_ACL_IPs_for_API', 2, 25, $list_ACL_IPs_for_API, 'style="height: 50px; width: 300px"', true);
|
$table->data[15][1] = html_print_textarea('list_ACL_IPs_for_API', 2, 25, $list_ACL_IPs_for_API, 'style="height: 50px; width: 300px"', true);
|
||||||
|
|
||||||
$table->data[16][0] = __('API password') .
|
$table->data[16][0] = __('API password') .
|
||||||
|
@ -44,27 +44,23 @@ function config_create_value ($token, $value) {
|
|||||||
function config_update_value ($token, $value) {
|
function config_update_value ($token, $value) {
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
switch ($token) {
|
if ($token == 'list_ACL_IPs_for_API')
|
||||||
case 'list_ACL_IPs_for_API':
|
$value = str_replace(array("\r\n", "\r", "\n"), ";", io_safe_output($value));
|
||||||
return (bool) config_create_value ($token, $value);
|
|
||||||
break;
|
if (!isset ($config[$token])) {
|
||||||
default:
|
$config[$token] = $value;
|
||||||
if (!isset ($config[$token])) {
|
return (bool) config_create_value ($token, $value);
|
||||||
$config[$token] = $value;
|
|
||||||
return (bool) config_create_value ($token, $value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* If it has not changed */
|
|
||||||
if ($config[$token] == $value)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
$config[$token] = $value;
|
|
||||||
|
|
||||||
return (bool) db_process_sql_update ('tconfig',
|
|
||||||
array ('value' => $value),
|
|
||||||
array ('token' => $token));
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If it has not changed */
|
||||||
|
if ($config[$token] == $value)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
$config[$token] = $value;
|
||||||
|
|
||||||
|
return (bool) db_process_sql_update ('tconfig',
|
||||||
|
array ('value' => $value),
|
||||||
|
array ('token' => $token));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -128,7 +124,7 @@ function config_update_config () {
|
|||||||
config_update_value ('agentaccess', (int) get_parameter ('agentaccess', $config['agentaccess']));
|
config_update_value ('agentaccess', (int) get_parameter ('agentaccess', $config['agentaccess']));
|
||||||
config_update_value ('flash_charts', (bool) get_parameter ('flash_charts', $config["flash_charts"]));
|
config_update_value ('flash_charts', (bool) get_parameter ('flash_charts', $config["flash_charts"]));
|
||||||
config_update_value ('attachment_store', (string) get_parameter ('attachment_store', $config["attachment_store"]));
|
config_update_value ('attachment_store', (string) get_parameter ('attachment_store', $config["attachment_store"]));
|
||||||
config_update_value ('list_ACL_IPs_for_API', (string) get_parameter('list_ACL_IPs_for_API', implode("\n", $config['list_ACL_IPs_for_API'])));
|
config_update_value ('list_ACL_IPs_for_API', (string) get_parameter('list_ACL_IPs_for_API'));
|
||||||
|
|
||||||
config_update_value ('custom_logo', (string) get_parameter ('custom_logo', $config["custom_logo"]));
|
config_update_value ('custom_logo', (string) get_parameter ('custom_logo', $config["custom_logo"]));
|
||||||
config_update_value ('history_db_enabled', (bool) get_parameter ('history_db_enabled', $config['history_db_enabled']));
|
config_update_value ('history_db_enabled', (bool) get_parameter ('history_db_enabled', $config['history_db_enabled']));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user