diff options
author | Ermal <eri@pfsense.org> | 2010-10-27 20:49:43 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2010-10-27 20:56:57 +0000 |
commit | a8200dbfe78171254fe059406784e0f94c0e625e (patch) | |
tree | 789485dd7e0010503cac60b571e924ec0666b83f /usr | |
parent | 6bef05546fd9674018f4e8b905da940fa1adefa7 (diff) | |
download | pfsense-a8200dbfe78171254fe059406784e0f94c0e625e.zip pfsense-a8200dbfe78171254fe059406784e0f94c0e625e.tar.gz |
Ticket #975. Rearrange code a little.
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/xmlrpc.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php index 44a48be..375ad46 100755 --- a/usr/local/www/xmlrpc.php +++ b/usr/local/www/xmlrpc.php @@ -157,19 +157,21 @@ function restore_config_section_xmlrpc($raw_params) { $params = xmlrpc_params_to_php($raw_params); if(!xmlrpc_auth($params)) return $xmlrpc_g['return']['authfail']; + $vipbackup = array(); if (isset($params[0]['virtualip'])) { if(is_array($config['virtualip']['vip'])) { foreach ($config['virtualip']['vip'] as $vip) interface_vip_bring_down($vip); } + $vipbackup = $config['virtualip']['vip']; } - $vipbackup=$config['virtualip']['vip']; // For vip section, first keep items sent from the master $config = array_merge($config, $params[0]); // Then add ipalias and proxyarp types already defined on the backup - foreach ($vipbackup as $vip) + foreach ($vipbackup as $vip) { if (($vip['mode'] == 'ipalias') || ($vip['mode'] == 'proxyarp')) $config['virtualip']['vip'][]=$vip ; + } $mergedkeys = implode(",", array_keys($params[0])); write_config(sprintf(gettext("Merged in config (%s sections) from XMLRPC client."),$mergedkeys)); interfaces_vips_configure(); |