From 014beac3134b7fd2c7af3fe008940c946ff6d546 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Mon, 14 Mar 2005 17:34:57 +0000 Subject: [PATCH] Say hello to firewall rules syncing! --- etc/inc/pfsense-utils.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index b254cab37e..9b6c8d2533 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -723,10 +723,10 @@ function is_service_running($service_name) { */ function backup_config_section($section) { global $config; - $new_section = &$config['section']; + $new_section = &$config['filter']; /* generate configuration XML */ $xmlconfig = dump_xml_config($new_section, $section); - return $new_section; + return $xmlconfig; } /* @@ -739,9 +739,9 @@ function restore_config_section($section, $new_contents) { conf_mount_rw(); config_lock(); $fout = fopen("{$g['tmp_path']}/tmpxml","w"); - fwrite($fout, $current_rules_section); + fwrite($fout, $new_contents); fclose($fout); - $section_xml = parse_xml_config_pkg($g['tmp_path'] . "/tmpxml", "packagegui"); + $section_xml = parse_xml_config_pkg($g['tmp_path'] . "/tmpxml", $section); $config[$section] = &$section_xml; unlink($g['tmp_path'] . "/tmpxml"); write_config();