summaryrefslogtreecommitdiff
path: root/includes/xmlrpc.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-04-29 22:02:02 +0000
committerDries Buytaert <dries@buytaert.net>2003-04-29 22:02:02 +0000
commitc2f3cb2b632fa01ed2f3082f1bde23c64bf254e9 (patch)
tree0178ecf8bd1c1fd4567c79333311a592a0c768e8 /includes/xmlrpc.inc
parent2d6408dff3931d7daee818eb07f74875e074b522 (diff)
downloadbrdo-c2f3cb2b632fa01ed2f3082f1bde23c64bf254e9.tar.gz
brdo-c2f3cb2b632fa01ed2f3082f1bde23c64bf254e9.tar.bz2
- Renamed 'xmlrpc_decode' to '_xmlrpc_decode' to avoid redeclaration when
PHP's XML-RPC library is enabled. - Renamed 'xmlrpc_encode' to '_xmlrpc_encode' to avoid redeclaration when PHP's XML-RPC library is enabled. - Removed 'if (funcion_exist("xmlrpc_encode"))' check from common.inc.
Diffstat (limited to 'includes/xmlrpc.inc')
-rw-r--r--includes/xmlrpc.inc24
1 files changed, 12 insertions, 12 deletions
diff --git a/includes/xmlrpc.inc b/includes/xmlrpc.inc
index d9f53bc38..77b1f7129 100644
--- a/includes/xmlrpc.inc
+++ b/includes/xmlrpc.inc
@@ -1008,13 +1008,13 @@ function iso8601_decode($idate, $utc=0) {
return $t;
}
-/****************************************************************
-* xmlrpc_decode takes a message in PHP xmlrpc object format and *
-* tranlates it into native PHP types. *
-* *
-* author: Dan Libby (dan@libby.com) *
-****************************************************************/
-function xmlrpc_decode($xmlrpc_val) {
+/*****************************************************************
+* _xmlrpc_decode takes a message in PHP xmlrpc object format and *
+* tranlates it into native PHP types. *
+* *
+* author: Dan Libby (dan@libby.com) *
+*****************************************************************/
+function _xmlrpc_decode($xmlrpc_val) {
$kind = $xmlrpc_val->kindOf();
if($kind == "scalar") {
@@ -1025,7 +1025,7 @@ function xmlrpc_decode($xmlrpc_val) {
$arr = array();
for($i = 0; $i < $size; $i++) {
- $arr[]=xmlrpc_decode($xmlrpc_val->arraymem($i));
+ $arr[]=_xmlrpc_decode($xmlrpc_val->arraymem($i));
}
return $arr;
}
@@ -1034,14 +1034,14 @@ function xmlrpc_decode($xmlrpc_val) {
$arr = array();
while(list($key,$value)=$xmlrpc_val->structeach()) {
- $arr[$key] = xmlrpc_decode($value);
+ $arr[$key] = _xmlrpc_decode($value);
}
return $arr;
}
}
/****************************************************************
-* xmlrpc_encode takes native php types and encodes them into *
+* _xmlrpc_encode takes native php types and encodes them into *
* xmlrpc PHP object format. *
* BUG: All sequential arrays are turned into structs. I don't *
* know of a good way to determine if an array is sequential *
@@ -1052,7 +1052,7 @@ function xmlrpc_decode($xmlrpc_val) {
* *
* author: Dan Libby (dan@libby.com) *
****************************************************************/
-function xmlrpc_encode($php_val) {
+function _xmlrpc_encode($php_val) {
global $xmlrpcInt;
global $xmlrpcDouble;
global $xmlrpcString;
@@ -1068,7 +1068,7 @@ function xmlrpc_encode($php_val) {
case "object":
$arr = array();
while (list($k,$v) = each($php_val)) {
- $arr[$k] = xmlrpc_encode($v);
+ $arr[$k] = _xmlrpc_encode($v);
}
$xmlrpc_val->addStruct($arr);
break;