Commit d3c7d74c authored by Franco Fichtner's avatar Franco Fichtner

system: backup corrections, no hay root tag

parent 96820738
...@@ -51,18 +51,15 @@ function restore_config_section($section_name, $new_contents) ...@@ -51,18 +51,15 @@ function restore_config_section($section_name, $new_contents)
$xml = load_config_from_file($tmpxml); $xml = load_config_from_file($tmpxml);
@unlink($tmpxml); @unlink($tmpxml);
if (!is_array($xml) || !isset($xml[0])) { if (!is_array($xml) || !isset($xml[$section_name])) {
return false;
}
$xml = $xml[0];
if (!isset($xml[$section_name])) {
return false; return false;
} }
$config[$section_name] = $xml[$section_name]; $config[$section_name] = $xml[$section_name];
write_config(sprintf(gettext("Restored %s of config file"), $section_name)); write_config(sprintf(gettext("Restored %s of config file"), $section_name));
convert_config();
disable_security_checks(); disable_security_checks();
return true; return true;
...@@ -159,7 +156,7 @@ $areas = array( ...@@ -159,7 +156,7 @@ $areas = array(
'igmpproxy' => gettext('IGMP Proxy'), 'igmpproxy' => gettext('IGMP Proxy'),
'installedpackages' => gettext('Universal Plug and Play'), /* XXX only one, reduce depth! */ 'installedpackages' => gettext('Universal Plug and Play'), /* XXX only one, reduce depth! */
'interfaces' => gettext('Interfaces'), 'interfaces' => gettext('Interfaces'),
'ipsec' => gettext('IPSEC'), 'ipsec' => gettext('IPsec'),
'laggs' => gettext('LAGG Devices'), 'laggs' => gettext('LAGG Devices'),
'load_balancer' => gettext('Load Balancer'), 'load_balancer' => gettext('Load Balancer'),
'nat' => gettext('Network Address Translation'), 'nat' => gettext('Network Address Translation'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment