mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-12 19:14:10 +01:00
added function to send xmlrpc-faults (error-msg) from the handler
This commit is contained in:
parent
99e4e9efec
commit
9ed6f2e60d
@ -42,7 +42,7 @@
|
||||
var $resp_struct = array();
|
||||
var $debug = False;
|
||||
var $method_requested;
|
||||
var $log = False; //'/tmp/xmlrpc.log';
|
||||
var $log = False; //'/tmp/xmlrpc.log';
|
||||
|
||||
function xmlrpc_server($dispMap='', $serviceNow=0)
|
||||
{
|
||||
@ -75,12 +75,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
function service()
|
||||
function service($r=False)
|
||||
{
|
||||
global $HTTP_RAW_POST_DATA;
|
||||
|
||||
$r = $this->parseRequest();
|
||||
if ($r == False)
|
||||
if (!$r) // do we have a response, or we need to parse the request
|
||||
{
|
||||
$r = $this->parseRequest();
|
||||
}
|
||||
if (!$r)
|
||||
{
|
||||
header('WWW-Authenticate: Basic realm="eGroupWare xmlrpc"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
@ -469,5 +472,16 @@
|
||||
fputs($fp,$HTTP_RAW_POST_DATA);
|
||||
fclose($fp);
|
||||
}
|
||||
|
||||
function xmlrpc_error($error_number, $error_string)
|
||||
{
|
||||
$r = CreateObject('phpgwapi.xmlrpcresp',
|
||||
'',
|
||||
$error_number,
|
||||
$error_string . ': ' . $this->last_method
|
||||
);
|
||||
$this->service($r);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user