mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 00:58:55 +01:00
You can now name a XML-RPC method one name, and have it call a different function name. For example, the method name is list and it calls _list()
This commit is contained in:
parent
49b8a43fbd
commit
1edd9f4331
@ -275,6 +275,8 @@
|
|||||||
// xmlrpc_debugmsg($plist);
|
// xmlrpc_debugmsg($plist);
|
||||||
// now to deal with the method
|
// now to deal with the method
|
||||||
$methName = $GLOBALS['_xh'][$parser]['method'];
|
$methName = $GLOBALS['_xh'][$parser]['method'];
|
||||||
|
$_methName = $GLOBALS['_xh'][$parser]['method'];
|
||||||
|
|
||||||
if (ereg("^system\.", $methName))
|
if (ereg("^system\.", $methName))
|
||||||
{
|
{
|
||||||
$dmap = $GLOBALS['_xmlrpcs_dmap'];
|
$dmap = $GLOBALS['_xmlrpcs_dmap'];
|
||||||
@ -285,6 +287,7 @@
|
|||||||
$dmap = $this->dmap;
|
$dmap = $this->dmap;
|
||||||
$sysCall=0;
|
$sysCall=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($dmap[$methName]['function']))
|
if (!isset($dmap[$methName]['function']))
|
||||||
{
|
{
|
||||||
if ($this->authed)
|
if ($this->authed)
|
||||||
@ -309,6 +312,7 @@
|
|||||||
/* _debug_array($this->dmap);exit; */
|
/* _debug_array($this->dmap);exit; */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($dmap[$methName]['function']))
|
if (isset($dmap[$methName]['function']))
|
||||||
{
|
{
|
||||||
// dispatch if exists
|
// dispatch if exists
|
||||||
@ -353,7 +357,8 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$res = ExecMethod($method,$this->req_array);
|
list($s,$c,$m) = explode('.',$_methName);
|
||||||
|
$res = ExecMethod($s . '.' . $c . '.' . $dmap[$methName]['function'],$this->req_array);
|
||||||
}
|
}
|
||||||
/* $res = ExecMethod($method,$params); */
|
/* $res = ExecMethod($method,$params); */
|
||||||
/* _debug_array($res);exit; */
|
/* _debug_array($res);exit; */
|
||||||
|
Loading…
Reference in New Issue
Block a user