summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-03-25 06:36:26 +0000
committerColin Smith <colin@pfsense.org>2005-03-25 06:36:26 +0000
commit0148e1527439244d7ae53a4631a3e3dd2f74c49b (patch)
treec936abb2a8c8c187b10adf48fb0193d4d039f214
parent57e6d4c90fb8ae384842282b8b06c4c1fd94d874 (diff)
downloadpfsense-0148e1527439244d7ae53a4631a3e3dd2f74c49b.zip
pfsense-0148e1527439244d7ae53a4631a3e3dd2f74c49b.tar.gz
Properly handle signatures and docstrings for method introspection.
-rwxr-xr-xusr/local/www/xmlrpc.php19
1 files changed, 4 insertions, 15 deletions
diff --git a/usr/local/www/xmlrpc.php b/usr/local/www/xmlrpc.php
index 8b5be4e..8901123 100755
--- a/usr/local/www/xmlrpc.php
+++ b/usr/local/www/xmlrpc.php
@@ -71,8 +71,8 @@ function xmlrpc_array_to_php($array) {
// Exposed functions.
-$backup_config_section_doc = 'backup_config_section_xmlrpc: XMLRPC wrapper for backup_config_section. This method must be called with two parameters: a string containing the local system\'s password followed by a string containing the section to be backed up.';
-$backup_config_section_sig = array(array($xmlrpcString, $xmlrpcString, $xmlrpcString));
+$backup_config_section_doc = 'XMLRPC wrapper for backup_config_section. This method must be called with two parameters: a string containing the local system\'s password followed by a string containing the section to be backed up.';
+$backup_config_section_sig = array(array(string, string, string));
function backup_config_section_xmlrpc($raw_params) {
global $config;
@@ -83,8 +83,8 @@ function backup_config_section_xmlrpc($raw_params) {
return new XML_RPC_Response($val);
}
-$restore_config_section_doc = 'restore_config_section_xmlrpc: XMLRPC wrapper for restore_config_section. This method must be called with three parameters: a string containing the local system\'s password, a string containing the section to be restored, and a string containing the returned value of backup_config_section() for that section. This function returns true upon completion.';
-$restore_config_section_sig = array(array($xmlrpcBoolean, $xmlrpcString, $xmlrpcString, $xmlrpcString));
+$restore_config_section_doc = 'XMLRPC wrapper for restore_config_section. This method must be called with three parameters: a string containing the local system\'s password, a string containing the section to be restored, and a string containing the returned value of backup_config_section() for that section. This function returns true upon completion.';
+$restore_config_section_sig = array(array(boolean, string, string, string));
function restore_config_section_xmlrpc($raw_params) {
global $config;
@@ -96,16 +96,6 @@ function restore_config_section_xmlrpc($raw_params) {
$server = new XML_RPC_Server(
array(
- 'pfsense.backup_config_section' => array('function' => 'backup_config_section_xmlrpc'),
- 'pfsense.restore_config_section' => array('function' => 'restore_config_section_xmlrpc')
- )
-);
-
-/*
-XXX: Fix signature handling.
-
-$server = new XML_RPC_Server(
- array(
'pfsense.backup_config_section' => array('function' => 'backup_config_section_xmlrpc',
'signature' => $backup_config_section_sig,
'docstring' => $backup_config_section_doc),
@@ -114,5 +104,4 @@ $server = new XML_RPC_Server(
'docstring' => $restore_config_section_doc)
)
);
-*/
?>
OpenPOWER on IntegriCloud