diff options
author | Ermal LUÇI <eri@pfsense.org> | 2014-12-02 12:35:36 +0100 |
---|---|---|
committer | Ermal LUÇI <eri@pfsense.org> | 2014-12-02 12:35:36 +0100 |
commit | 110967a4ba58aa6ee02dbfd46dbb0fca562f180e (patch) | |
tree | 09afe34900b054fbc04359a3e3e0c05bb8123435 /usr/local/www/interfaces.php | |
parent | 7f06001481ae72c8b46b1fb44b2784da1764a3b3 (diff) | |
download | pfsense-110967a4ba58aa6ee02dbfd46dbb0fca562f180e.zip pfsense-110967a4ba58aa6ee02dbfd46dbb0fca562f180e.tar.gz |
Try to not make useless entries in the config file for very rare used configuration values. Makes config file readble and with less size
Diffstat (limited to 'usr/local/www/interfaces.php')
-rw-r--r-- | usr/local/www/interfaces.php | 96 |
1 files changed, 62 insertions, 34 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 0d4535e..b79da65 100644 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -1067,40 +1067,68 @@ if ($_POST['apply']) { if($_POST['dhcp6usev4iface'] == "yes") $wancfg['dhcp6usev4iface'] = true; - $wancfg['adv_dhcp6_interface_statement_send_options'] = $_POST['adv_dhcp6_interface_statement_send_options']; - $wancfg['adv_dhcp6_interface_statement_request_options'] = $_POST['adv_dhcp6_interface_statement_request_options']; - $wancfg['adv_dhcp6_interface_statement_information_only_enable'] = $_POST['adv_dhcp6_interface_statement_information_only_enable']; - $wancfg['adv_dhcp6_interface_statement_script'] = $_POST['adv_dhcp6_interface_statement_script']; - - $wancfg['adv_dhcp6_id_assoc_statement_address_enable'] = $_POST['adv_dhcp6_id_assoc_statement_address_enable']; - $wancfg['adv_dhcp6_id_assoc_statement_address'] = $_POST['adv_dhcp6_id_assoc_statement_address']; - $wancfg['adv_dhcp6_id_assoc_statement_address_id'] = $_POST['adv_dhcp6_id_assoc_statement_address_id']; - $wancfg['adv_dhcp6_id_assoc_statement_address_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_address_pltime']; - $wancfg['adv_dhcp6_id_assoc_statement_address_vltime'] = $_POST['adv_dhcp6_id_assoc_statement_address_vltime']; - - $wancfg['adv_dhcp6_id_assoc_statement_prefix_enable'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_enable']; - $wancfg['adv_dhcp6_id_assoc_statement_prefix'] = $_POST['adv_dhcp6_id_assoc_statement_prefix']; - $wancfg['adv_dhcp6_id_assoc_statement_prefix_id'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_id']; - $wancfg['adv_dhcp6_id_assoc_statement_prefix_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_pltime']; - $wancfg['adv_dhcp6_id_assoc_statement_prefix_vltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_vltime']; - - $wancfg['adv_dhcp6_prefix_interface_statement_sla_id'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_id']; - $wancfg['adv_dhcp6_prefix_interface_statement_sla_len'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_len']; - - $wancfg['adv_dhcp6_authentication_statement_authname'] = $_POST['adv_dhcp6_authentication_statement_authname']; - $wancfg['adv_dhcp6_authentication_statement_protocol'] = $_POST['adv_dhcp6_authentication_statement_protocol']; - $wancfg['adv_dhcp6_authentication_statement_algorithm'] = $_POST['adv_dhcp6_authentication_statement_algorithm']; - $wancfg['adv_dhcp6_authentication_statement_rdm'] = $_POST['adv_dhcp6_authentication_statement_rdm']; - - $wancfg['adv_dhcp6_key_info_statement_keyname'] = $_POST['adv_dhcp6_key_info_statement_keyname']; - $wancfg['adv_dhcp6_key_info_statement_realm'] = $_POST['adv_dhcp6_key_info_statement_realm']; - $wancfg['adv_dhcp6_key_info_statement_keyid'] = $_POST['adv_dhcp6_key_info_statement_keyid']; - $wancfg['adv_dhcp6_key_info_statement_secret'] = $_POST['adv_dhcp6_key_info_statement_secret']; - $wancfg['adv_dhcp6_key_info_statement_expire'] = $_POST['adv_dhcp6_key_info_statement_expire']; - - $wancfg['adv_dhcp6_config_advanced'] = $_POST['adv_dhcp6_config_advanced']; - $wancfg['adv_dhcp6_config_file_override'] = $_POST['adv_dhcp6_config_file_override']; - $wancfg['adv_dhcp6_config_file_override_path'] = $_POST['adv_dhcp6_config_file_override_path']; + if (!empty($_POST['adv_dhcp6_interface_statement_send_options'])) + $wancfg['adv_dhcp6_interface_statement_send_options'] = $_POST['adv_dhcp6_interface_statement_send_options']; + if (!empty($_POST['adv_dhcp6_interface_statement_request_options'])) + $wancfg['adv_dhcp6_interface_statement_request_options'] = $_POST['adv_dhcp6_interface_statement_request_options']; + if (isset($_POST['adv_dhcp6_interface_statement_information_only_enable'])) + $wancfg['adv_dhcp6_interface_statement_information_only_enable'] = $_POST['adv_dhcp6_interface_statement_information_only_enable']; + if (!empty($_POST['adv_dhcp6_interface_statement_script'])) + $wancfg['adv_dhcp6_interface_statement_script'] = $_POST['adv_dhcp6_interface_statement_script']; + + if (isset($_POST['adv_dhcp6_id_assoc_statement_address_enable'])) + $wancfg['adv_dhcp6_id_assoc_statement_address_enable'] = $_POST['adv_dhcp6_id_assoc_statement_address_enable']; + if (!empty($_POST['adv_dhcp6_id_assoc_statement_address'])) + $wancfg['adv_dhcp6_id_assoc_statement_address'] = $_POST['adv_dhcp6_id_assoc_statement_address']; + if (!empty($_POST['adv_dhcp6_id_assoc_statement_address_id'])) + $wancfg['adv_dhcp6_id_assoc_statement_address_id'] = $_POST['adv_dhcp6_id_assoc_statement_address_id']; + if (!empty($_POST['adv_dhcp6_id_assoc_statement_address_pltime'])) + $wancfg['adv_dhcp6_id_assoc_statement_address_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_address_pltime']; + if (!empty($_POST['adv_dhcp6_id_assoc_statement_address_vltime'])) + $wancfg['adv_dhcp6_id_assoc_statement_address_vltime'] = $_POST['adv_dhcp6_id_assoc_statement_address_vltime']; + + if (isset($_POST['adv_dhcp6_id_assoc_statement_prefix_enable'])) + $wancfg['adv_dhcp6_id_assoc_statement_prefix_enable'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_enable']; + if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix'])) + $wancfg['adv_dhcp6_id_assoc_statement_prefix'] = $_POST['adv_dhcp6_id_assoc_statement_prefix']; + if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix_id'])) + $wancfg['adv_dhcp6_id_assoc_statement_prefix_id'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_id']; + if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix_pltime'])) + $wancfg['adv_dhcp6_id_assoc_statement_prefix_pltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_pltime']; + if (!empty($_POST['adv_dhcp6_id_assoc_statement_prefix_vltime'])) + $wancfg['adv_dhcp6_id_assoc_statement_prefix_vltime'] = $_POST['adv_dhcp6_id_assoc_statement_prefix_vltime']; + + if (!empty($_POST['adv_dhcp6_prefix_interface_statement_sla_id'])) + $wancfg['adv_dhcp6_prefix_interface_statement_sla_id'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_id']; + if (!empty($_POST['adv_dhcp6_prefix_interface_statement_sla_len'])) + $wancfg['adv_dhcp6_prefix_interface_statement_sla_len'] = $_POST['adv_dhcp6_prefix_interface_statement_sla_len']; + + if (!empty($_POST['adv_dhcp6_authentication_statement_authname'])) + $wancfg['adv_dhcp6_authentication_statement_authname'] = $_POST['adv_dhcp6_authentication_statement_authname']; + if (!empty($_POST['adv_dhcp6_authentication_statement_protocol'])) + $wancfg['adv_dhcp6_authentication_statement_protocol'] = $_POST['adv_dhcp6_authentication_statement_protocol']; + if (!empty($_POST['adv_dhcp6_authentication_statement_algorithm'])) + $wancfg['adv_dhcp6_authentication_statement_algorithm'] = $_POST['adv_dhcp6_authentication_statement_algorithm']; + if (!empty($_POST['adv_dhcp6_authentication_statement_rdm'])) + $wancfg['adv_dhcp6_authentication_statement_rdm'] = $_POST['adv_dhcp6_authentication_statement_rdm']; + + if (!empty($_POST['adv_dhcp6_key_info_statement_keyname'])) + $wancfg['adv_dhcp6_key_info_statement_keyname'] = $_POST['adv_dhcp6_key_info_statement_keyname']; + if (!empty($_POST['adv_dhcp6_key_info_statement_realm'])) + $wancfg['adv_dhcp6_key_info_statement_realm'] = $_POST['adv_dhcp6_key_info_statement_realm']; + if (!empty($_POST['adv_dhcp6_key_info_statement_keyid'])) + $wancfg['adv_dhcp6_key_info_statement_keyid'] = $_POST['adv_dhcp6_key_info_statement_keyid']; + if (!empty($_POST['adv_dhcp6_key_info_statement_secret'])) + $wancfg['adv_dhcp6_key_info_statement_secret'] = $_POST['adv_dhcp6_key_info_statement_secret']; + if (!empty($_POST['adv_dhcp6_key_info_statement_expire'])) + $wancfg['adv_dhcp6_key_info_statement_expire'] = $_POST['adv_dhcp6_key_info_statement_expire']; + + if (!empty($_POST['adv_dhcp6_config_advanced'])) + $wancfg['adv_dhcp6_config_advanced'] = $_POST['adv_dhcp6_config_advanced']; + if (!empty($_POST['adv_dhcp6_config_file_override'])) + $wancfg['adv_dhcp6_config_file_override'] = $_POST['adv_dhcp6_config_file_override']; + if (!empty($_POST['adv_dhcp6_config_file_override_path'])) + $wancfg['adv_dhcp6_config_file_override_path'] = $_POST['adv_dhcp6_config_file_override_path']; if($gateway_item) { $a_gateways[] = $gateway_item; |