projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Melix alias visibility in VCards should be user's visibility, and not viewer's alias...
[platal.git]
/
classes
/
xmlrpcclient.php
diff --git
a/classes/xmlrpcclient.php
b/classes/xmlrpcclient.php
index
cbcae3c
..
be47a70
100644
(file)
--- a/
classes/xmlrpcclient.php
+++ b/
classes/xmlrpcclient.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-200
7
Polytechnique.org *
+ * Copyright (C) 2003-200
8
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-32,6
+32,7
@@
class XmlrpcClient
{
private $url;
private $urlparts;
{
private $url;
private $urlparts;
+ public $bt = null;
public function __construct($url)
{
public function __construct($url)
{
@@
-99,8
+100,21
@@
class XmlrpcClient
public function __call($method, $args)
{
$query = xmlrpc_encode_request($method, $args);
public function __call($method, $args)
{
$query = xmlrpc_encode_request($method, $args);
+ if ($this->bt) {
+ $this->bt->start($method . "\n" . var_export($args, true));
+ }
$answer = $this->http_post($query, $this->urlparts);
$answer = $this->http_post($query, $this->urlparts);
+ if ($this->bt) {
+ $this->bt->stop();
+ }
$result = $this->find_and_decode_xml($answer);
$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".
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
:
?>
?>