summaryrefslogtreecommitdiffstats
path: root/usr/local/www/xmlrpc.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-02-14 04:27:51 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-02-14 04:27:51 +0000
commit82ae5cfc97ea6dcd5b98095d272364cf007a78cd (patch)
treee14490e83c531f623194b605430785af98c40dac /usr/local/www/xmlrpc.php
parentc2d7f97e9eedd727ce33015422957f61e0137981 (diff)
downloadpfsense-82ae5cfc97ea6dcd5b98095d272364cf007a78cd.zip
pfsense-82ae5cfc97ea6dcd5b98095d272364cf007a78cd.tar.gz
* Add merge_installedpackages_section_xmlrpc() call used for merging
specific <installedpackages><AREANAME> sub items without replacing the entire <installedpackages> area with just this item * Adjust TinyDNS sync to use this new method to avoid replacing the entire destination <installedpackages> area which also whipes out all other installd package information.
Diffstat (limited to 'usr/local/www/xmlrpc.php')
-rwxr-xr-xusr/local/www/xmlrpc.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index c6523a1..a469910 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -105,6 +105,30 @@ function restore_config_section_xmlrpc($raw_params) {
return $xmlrpc_g['return']['true'];
}
+
+/*****************************/
+
+
+$merge_config_section_doc = 'XMLRPC wrapper for merging package sections. This method must be called with two parameters: a string containing the local system\'s password and an array to merge into the system\'s config. This function returns true upon completion.';
+$merge_config_section_sig = array(
+ array(
+ $XML_RPC_Boolean,
+ $XML_RPC_String,
+ $XML_RPC_Struct
+ )
+ );
+
+function merge_installedpackages_section_xmlrpc($raw_params) {
+ global $config, $xmlrpc_g;
+ $params = xmlrpc_params_to_php($raw_params);
+ if(!xmlrpc_auth($params)) return $xmlrpc_g['return']['authfail'];
+ $config['installedpackages'] = array_merge($config['installedpackages'], $params[0]);
+ $mergedkeys = implode(",", array_keys($params[0]));
+ write_config("Merged in config ({$mergedkeys} sections) from XMLRPC client.");
+ return $xmlrpc_g['return']['true'];
+}
+
+
/*****************************/
OpenPOWER on IntegriCloud