X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fxmlrpc.inc;h=ad41414062b7b41ccd8a1e6a2251bfcadb3c4e30;hb=5bec95fe331a9e7afceff701458e2998ab299b3e;hp=52424b00aaaf7f50cc7d231e34a758e13fca58a1;hpb=9decb91e487db7cf575f6a4cbdd43afba7ea1cac;p=plcapi.git diff --git a/lib/xmlrpc.inc b/lib/xmlrpc.inc index 52424b0..ad41414 100644 --- a/lib/xmlrpc.inc +++ b/lib/xmlrpc.inc @@ -707,6 +707,7 @@ $GLOBALS['_xh']['value'] = $curr_val['values']; $GLOBALS['_xh']['vt']=strtolower($name); if (isset($curr_val['php_class'])) + { $GLOBALS['_xh']['php_class'] = $curr_val['php_class']; } @@ -988,6 +989,7 @@ function setCaCertificate($cacert, $is_dir=false) { if ($is_dir) + { $this->cacertdir = $cacert; } @@ -1062,7 +1064,10 @@ if ($compmethod == 'any') $this->accepted_compression = array('gzip', 'deflate'); else - $this->accepted_compression = array($compmethod); + if ($compmethod == false ) + $this->accepted_compression = array(); + else + $this->accepted_compression = array($compmethod); } /** @@ -1159,6 +1164,7 @@ $msg->debug=$this->debug; if($method == 'https') + { $r =& $this->sendPayloadHTTPS( $msg, @@ -1667,7 +1673,14 @@ { print "
\n---CURL INFO---\n";
 				foreach(curl_getinfo($curl) as $name => $val)
-					 print $name . ': ' . htmlentities($val). "\n";
+				{
+					if (is_array($val))
+					{
+						$val = implode("\n", $val);
+					}
+					print $name . ': ' . htmlentities($val) . "\n";
+				}
+
 				print "---END---\n
"; } @@ -1847,6 +1860,7 @@ case 1: if(!isset($val[0])) { + return false; // Bad value } // Normal return value @@ -3316,7 +3330,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha $out = $xmlrpc_val->scalarval(); if (is_string($out)) { - $out= strtotime($out); + $out = strtotime($out); } if (is_int($out)) { @@ -3499,6 +3513,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha $xmlrpc_val = new xmlrpcval((int)$php_val, $GLOBALS['xmlrpcInt']); } else + { $xmlrpc_val = new xmlrpcval(); } @@ -3700,6 +3715,7 @@ xmlrpc_encode_entitites($this->errstr, $GLOBALS['xmlrpc_internalencoding'], $cha } elseif(preg_match('/^(\xEF\xBB\xBF)/', $xmlchunk)) { + return 'UTF-8'; }