mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-17 02:41:02 +01:00
- Reverted yesterdays changes back to the orginal
- Fixed returning integer values of 0 loosing the value once the XML reponse is being created
This commit is contained in:
parent
7ab7c98412
commit
ebe631bc10
@ -197,17 +197,33 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
$_type = (is_long($_res)?'int':gettype($_res));
|
||||
$_type = (is_integer($_res)?'int':gettype($_res));
|
||||
if ($recursed)
|
||||
{
|
||||
// Passing an integer of 0 to the xmlrpcval constructor results in the value being lost. (jengo)
|
||||
if ($_type == 'int' && $_res == 0)
|
||||
{
|
||||
return CreateObject('phpgwapi.xmlrpcval','0',$_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
return CreateObject('phpgwapi.xmlrpcval',$_res,$_type);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Passing an integer of 0 to the xmlrpcval constructor results in the value being lost. (jengo)
|
||||
if ($_type == 'int' && $_res == 0)
|
||||
{
|
||||
$this->resp_struct[] = CreateObject('phpgwapi.xmlrpcval','0',$_type);
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->resp_struct[] = CreateObject('phpgwapi.xmlrpcval',$_res,$_type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function parseRequest($data='')
|
||||
{
|
||||
@ -319,17 +335,14 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
// phpgw mod - finally, execute the function call and return the values
|
||||
/* phpgw mod - finally, execute the function call and return the values */
|
||||
$params = $GLOBALS['_xh'][$parser]['params'][0];
|
||||
$code = '$p = ' . $params . ';';
|
||||
if ($code != '$p = ;')
|
||||
{
|
||||
eval($code);
|
||||
$params = $p->getval();
|
||||
}
|
||||
|
||||
// _debug_array($params);
|
||||
//$this->reqtoarray($params);
|
||||
$this->reqtoarray($params);
|
||||
//_debug_array($this->req_array);
|
||||
if(ereg('^service',$method))
|
||||
{
|
||||
@ -337,17 +350,16 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
// $res = ExecMethod($method,$this->req_array);
|
||||
$r = ExecMethod($method,$params);
|
||||
$res = ExecMethod($method,$this->req_array);
|
||||
}
|
||||
|
||||
// _debug_array($res);exit;
|
||||
/* $res = ExecMethod($method,$params); */
|
||||
/* _debug_array($res);exit; */
|
||||
$this->resp_struct = array();
|
||||
$this->build_resp($res);
|
||||
//_debug_array($this->resp_struct);
|
||||
/*_debug_array($this->resp_struct); */
|
||||
@reset($this->resp_struct);
|
||||
// $r = CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',$this->resp_struct,'struct'));
|
||||
// _debug_array($r);
|
||||
$r = CreateObject('phpgwapi.xmlrpcresp',CreateObject('phpgwapi.xmlrpcval',$this->resp_struct,'struct'));
|
||||
/* _debug_array($r); */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -27,6 +27,7 @@
|
||||
{
|
||||
$this->me = array();
|
||||
$this->mytype = 0;
|
||||
|
||||
if ($val != -1 || $type != '')
|
||||
{
|
||||
if ($type=='')
|
||||
|
Loading…
Reference in New Issue
Block a user