diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2006-01-18 23:08:39 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2006-01-18 23:08:39 +0000 |
commit | b755666f89d68f4a8f5eb1cd4a90a2a463d90583 (patch) | |
tree | 48ae63d78e0e24e860b4787337731790080d3cb3 /etc/inc/xmlrpc_client.inc | |
parent | ff074bf9484800509afeb99ee23005166bfd7200 (diff) | |
download | pfsense-b755666f89d68f4a8f5eb1cd4a90a2a463d90583.zip pfsense-b755666f89d68f4a8f5eb1cd4a90a2a463d90583.tar.gz |
MFC 9496
Update the XML_RPC client package to 1.4.5, released on 01/14/06. This fixes a header() issue with PHP 4.4.2.
Diffstat (limited to 'etc/inc/xmlrpc_client.inc')
-rw-r--r-- | etc/inc/xmlrpc_client.inc | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/etc/inc/xmlrpc_client.inc b/etc/inc/xmlrpc_client.inc index 6b58b1f..aa329b9 100644 --- a/etc/inc/xmlrpc_client.inc +++ b/etc/inc/xmlrpc_client.inc @@ -446,13 +446,13 @@ function XML_RPC_ee($parser_resource, $name) break; case 'VALUE': - // deal with a string value - if (strlen($XML_RPC_xh[$parser]['ac']) > 0 && - $XML_RPC_xh[$parser]['vt'] == $XML_RPC_String) { - $XML_RPC_xh[$parser]['value'] = $XML_RPC_xh[$parser]['ac']; - } elseif ($XML_RPC_xh[$parser]['lv'] == 1) { - // The <value> element was empty. - $XML_RPC_xh[$parser]['value'] = ''; + if ($XML_RPC_xh[$parser]['vt'] == $XML_RPC_String) { + if (strlen($XML_RPC_xh[$parser]['ac']) > 0) { + $XML_RPC_xh[$parser]['value'] = $XML_RPC_xh[$parser]['ac']; + } elseif ($XML_RPC_xh[$parser]['lv'] == 1) { + // The <value> element was empty. + $XML_RPC_xh[$parser]['value'] = ''; + } } $temp = new XML_RPC_Value($XML_RPC_xh[$parser]['value'], $XML_RPC_xh[$parser]['vt']); @@ -546,7 +546,7 @@ function XML_RPC_cd($parser_resource, $data) * @author Martin Jansen <mj@php.net> * @author Daniel Convissor <danielc@php.net> * @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group - * @version Release: 1.4.2 + * @version Release: 1.4.5 * @link http://pear.php.net/package/XML_RPC */ class XML_RPC_Base { @@ -591,7 +591,7 @@ class XML_RPC_Base { * @author Martin Jansen <mj@php.net> * @author Daniel Convissor <danielc@php.net> * @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group - * @version Release: 1.4.2 + * @version Release: 1.4.5 * @link http://pear.php.net/package/XML_RPC */ class XML_RPC_Client extends XML_RPC_Base { @@ -1014,7 +1014,7 @@ class XML_RPC_Client extends XML_RPC_Base { * @author Martin Jansen <mj@php.net> * @author Daniel Convissor <danielc@php.net> * @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group - * @version Release: 1.4.2 + * @version Release: 1.4.5 * @link http://pear.php.net/package/XML_RPC */ class XML_RPC_Response extends XML_RPC_Base @@ -1105,7 +1105,7 @@ class XML_RPC_Response extends XML_RPC_Base * @author Martin Jansen <mj@php.net> * @author Daniel Convissor <danielc@php.net> * @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group - * @version Release: 1.4.2 + * @version Release: 1.4.5 * @link http://pear.php.net/package/XML_RPC */ class XML_RPC_Message extends XML_RPC_Base @@ -1451,7 +1451,7 @@ class XML_RPC_Message extends XML_RPC_Base * @author Martin Jansen <mj@php.net> * @author Daniel Convissor <danielc@php.net> * @copyright 1999-2001 Edd Dumbill, 2001-2005 The PHP Group - * @version Release: 1.4.2 + * @version Release: 1.4.5 * @link http://pear.php.net/package/XML_RPC */ class XML_RPC_Value extends XML_RPC_Base @@ -1835,7 +1835,6 @@ function XML_RPC_iso8601_encode($timet, $utc = 0) function XML_RPC_iso8601_decode($idate, $utc = 0) { $t = 0; - $regs = ""; if (ereg('([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})', $idate, $regs)) { if ($utc) { $t = gmmktime($regs[4], $regs[5], $regs[6], $regs[2], $regs[3], $regs[1]); @@ -1888,7 +1887,7 @@ function XML_RPC_decode($XML_RPC_val) function XML_RPC_encode($php_val) { global $XML_RPC_Boolean, $XML_RPC_Int, $XML_RPC_Double, $XML_RPC_String, - $XML_RPC_Array, $XML_RPC_Struct; + $XML_RPC_Array, $XML_RPC_Struct, $XML_RPC_DateTime; $type = gettype($php_val); $XML_RPC_val = new XML_RPC_Value; @@ -1928,7 +1927,11 @@ function XML_RPC_encode($php_val) case 'string': case 'NULL': - $XML_RPC_val->addScalar($php_val, $XML_RPC_String); + if(ereg('^[0-9]{8}\T{1}[0-9]{2}\:[0-9]{2}\:[0-9]{2}$', $php_val)) { + $XML_RPC_val->addScalar($php_val, $XML_RPC_DateTime); + } else { + $XML_RPC_val->addScalar($php_val, $XML_RPC_String); + } break; case 'boolean': @@ -1953,4 +1956,4 @@ function XML_RPC_encode($php_val) * End: */ -?>
\ No newline at end of file +?> |