summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2011-12-12 14:48:16 -0500
committerjim-p <jimp@pfsense.org>2011-12-12 14:48:16 -0500
commit850b0518dcc0f9564329e7ae8f47681dfb31f262 (patch)
treed588add973286a5a93b3005b944a0fc27f450524
parent108d92bb6cfd1d8f147351b484abc013ea02ba4d (diff)
downloadpfsense-850b0518dcc0f9564329e7ae8f47681dfb31f262.zip
pfsense-850b0518dcc0f9564329e7ae8f47681dfb31f262.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.
-rwxr-xr-xusr/local/www/xmlrpc.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index 69e6f7c..e3dad6f 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));
/*
OpenPOWER on IntegriCloud