diff options
author | jim-p <jimp@pfsense.org> | 2011-12-12 14:48:16 -0500 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2011-12-12 14:49:02 -0500 |
commit | 1b99e1e53a75e3e439f4b66d8d5b863250fdfc42 (patch) | |
tree | c359e7a05d79cc228f5a49f8c2ee5cc59023b42b /usr/local/www | |
parent | 1c3351bd08c6b3fd3c808e339ac5d20d7b9f18fc (diff) | |
download | pfsense-1b99e1e53a75e3e439f4b66d8d5b863250fdfc42.zip pfsense-1b99e1e53a75e3e439f4b66d8d5b863250fdfc42.tar.gz |
Some sections should just be copied and not merged or we end up unable to sync the deletion of the last item in a section.
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/xmlrpc.php | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php index de0d206..49c05a3 100755 --- a/usr/local/www/xmlrpc.php +++ b/usr/local/www/xmlrpc.php @@ -170,6 +170,19 @@ function restore_config_section_xmlrpc($raw_params) { xmlrpc_authfail(); return $xmlrpc_g['return']['authfail']; } + + // Some sections should just be copied and not merged or we end + // up unable to sync the deletion of the last item in a section + $sync_full = array('ipsec', 'aliases', 'wol', 'load_balancer', 'openvpn', 'cert', 'ca', 'crl', 'schedules'); + $sync_full_done = array(); + foreach ($sync_full as $syncfull) { + if (isset($params[0][$syncfull])) { + $config[$syncfull] = $params[0][$syncfull]; + unset($params[0][$syncfull]); + $sync_full_done[] = $syncfull; + } + } + $vipbackup = array(); $oldvips = array(); if (isset($params[0]['virtualip'])) { @@ -199,7 +212,7 @@ function restore_config_section_xmlrpc($raw_params) { } /* Log what happened */ - $mergedkeys = implode(",", array_keys($params[0])); + $mergedkeys = implode(",", array_merge(array_keys($params[0]), $sync_full_done)); write_config(sprintf(gettext("Merged in config (%s sections) from XMLRPC client."),$mergedkeys)); /* |