summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorColin Smith <colin@pfsense.org>2005-09-18 05:19:48 +0000
committerColin Smith <colin@pfsense.org>2005-09-18 05:19:48 +0000
commit13657e92e65d0e619c1d704035041ba9184ff0b2 (patch)
tree8554b17a65d1838159a1f4ba3c22495adef89137 /etc
parent59c35166125c239e040a400212cb7aa6f5c88b3e (diff)
downloadpfsense-13657e92e65d0e619c1d704035041ba9184ff0b2.zip
pfsense-13657e92e65d0e619c1d704035041ba9184ff0b2.tar.gz
Use documented XML_RPC functions if available.
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/xmlrpc.inc10
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/inc/xmlrpc.inc b/etc/inc/xmlrpc.inc
index 6cb4da3..11a2b43 100644
--- a/etc/inc/xmlrpc.inc
+++ b/etc/inc/xmlrpc.inc
@@ -37,7 +37,7 @@ function xmlrpc_params_to_php($params) {
$array = array();
for($i = 0; $i < $params->getNumParams(); $i++) {
$value = $params->getParam($i);
- $array[] = xmlrpc_value_to_php($value);
+ $array[] = XML_RPC_decode($value);
}
return $array;
}
@@ -46,6 +46,7 @@ function xmlrpc_params_to_php($params) {
* xmlrpc_value_to_php: Convert an XMLRPC value into a PHP scalar/array and return it.
*/
function xmlrpc_value_to_php($raw_value) {
+ /*
switch($raw_value->kindOf()) {
case "scalar":
if($raw_value->scalartyp() == "boolean") $return = (boolean) $raw_value->scalarval();
@@ -66,13 +67,17 @@ function xmlrpc_value_to_php($raw_value) {
}
break;
}
- return $return;
+ */
+ return XML_RPC_decode($return);
}
/*
* php_value_to_xmlrpc: Convert a PHP scalar or array into its XMLRPC equivalent.
*/
function php_value_to_xmlrpc($value, $force_array = false) {
+ $toreturn = XML_RPC_encode($value);
+ return $force_array ? array($toreturn) : $toreturn;
+ /*
if(gettype($value) == "array") {
$xmlrpc_type = "array";
$toreturn = array();
@@ -88,6 +93,7 @@ function php_value_to_xmlrpc($value, $force_array = false) {
return new XML_RPC_Value($value, gettype($value));
}
}
+ */
}
/*
OpenPOWER on IntegriCloud