X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=classes%2Fxmlrpcclient.php;h=c359730f33921044b00f9a07187645051d4d8f5c;hb=663c7f8e9bdc2d3d3f36ad25a63e62913f3b25ce;hp=cbcae3c7868faa31a3431c561cdfcaaf7eec6f30;hpb=5ddeb07cc787dd1dc3630a31f1528f5cc7c4d9b9;p=platal.git diff --git a/classes/xmlrpcclient.php b/classes/xmlrpcclient.php index cbcae3c..c359730 100644 --- a/classes/xmlrpcclient.php +++ b/classes/xmlrpcclient.php @@ -1,6 +1,6 @@ bt) { + $this->bt->start($method . "\n" . var_export($args, true)); + } $answer = $this->http_post($query, $this->urlparts); + if ($this->bt) { + $this->bt->stop(); + } $result = $this->find_and_decode_xml($answer); + if ($this->bt) { + if (is_array($result) && isset($result['faultCode'])) { + $this->bt->update(0, $result['faultString']); + } else { + $this->bt->update(count($result)); + } + } if (is_array($result) && isset($result['faultCode'])) { trigger_error("Error in xmlrpc call $function\n". @@ -112,5 +126,5 @@ class XmlrpcClient } } -// vim:set et sw=4 sts=4 sws=4: +// vim:set et sw=4 sts=4 sws=4 enc=utf-8: ?>