fixed function to send xmlrpc-faults (error-msg) from the handler, was not loged in the log-file

This commit is contained in:
Ralf Becker 2004-03-07 10:00:18 +00:00
parent 9ed6f2e60d
commit 49d9007518

View File

@ -23,7 +23,7 @@
{
var $server = '';
var $authed = True;
var $log = '/tmp/xmlrpc_request_log';
var $log = False; //'/tmp/xmlrpc.log';
var $last_method = '';
function xmlrpc_server($dispMap='', $serviceNow=0)
@ -43,9 +43,12 @@
{
}
function service()
function service($r = False)
{
$r = $this->parseRequest();
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"');
@ -308,7 +311,7 @@
xmlrpc_error(1005,$error_string);
}
}
/*
function xmlrpc_error($error_number, $error_string)
{
$values = array(
@ -321,4 +324,15 @@
xmlrpc_server_destroy($GLOBALS['xmlrpc_server']);
exit;
}
*/
function xmlrpc_error($error_number, $error_string)
{
$r = CreateObject('phpgwapi.xmlrpcresp',
'',
$error_number,
$error_string . ': ' . $this->last_method
);
$this->service($r);
exit;
}
}