mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 16:44:39 +00:00
system: backup corrections, no hay root tag
This commit is contained in:
parent
968207385f
commit
d3c7d74ce7
@ -51,18 +51,15 @@ function restore_config_section($section_name, $new_contents)
|
||||
$xml = load_config_from_file($tmpxml);
|
||||
@unlink($tmpxml);
|
||||
|
||||
if (!is_array($xml) || !isset($xml[0])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$xml = $xml[0];
|
||||
|
||||
if (!isset($xml[$section_name])) {
|
||||
if (!is_array($xml) || !isset($xml[$section_name])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$config[$section_name] = $xml[$section_name];
|
||||
|
||||
write_config(sprintf(gettext("Restored %s of config file"), $section_name));
|
||||
convert_config();
|
||||
|
||||
disable_security_checks();
|
||||
|
||||
return true;
|
||||
@ -159,7 +156,7 @@ $areas = array(
|
||||
'igmpproxy' => gettext('IGMP Proxy'),
|
||||
'installedpackages' => gettext('Universal Plug and Play'), /* XXX only one, reduce depth! */
|
||||
'interfaces' => gettext('Interfaces'),
|
||||
'ipsec' => gettext('IPSEC'),
|
||||
'ipsec' => gettext('IPsec'),
|
||||
'laggs' => gettext('LAGG Devices'),
|
||||
'load_balancer' => gettext('Load Balancer'),
|
||||
'nat' => gettext('Network Address Translation'),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user