function xmlrpc_server_multicall in Drupal 5
Same name and namespace in other branches
- 4 includes/xmlrpcs.inc \xmlrpc_server_multicall()
- 6 includes/xmlrpcs.inc \xmlrpc_server_multicall()
- 7 includes/xmlrpcs.inc \xmlrpc_server_multicall()
1 string reference to 'xmlrpc_server_multicall'
- xmlrpc_server in includes/
xmlrpcs.inc - The main entry point for XML-RPC requests.
File
- includes/
xmlrpcs.inc, line 216
Code
function xmlrpc_server_multicall($methodcalls) {
// See http://www.xmlrpc.com/discuss/msgReader$1208
$return = array();
$xmlrpc_server = xmlrpc_server_get();
foreach ($methodcalls as $call) {
$ok = TRUE;
if (!isset($call['methodName']) || !isset($call['params'])) {
$result = xmlrpc_error(3, t('Invalid syntax for system.multicall.'));
$ok = FALSE;
}
$method = $call['methodName'];
$params = $call['params'];
if ($method == 'system.multicall') {
$result = xmlrpc_error(-32600, t('Recursive calls to system.multicall are forbidden.'));
}
elseif ($ok) {
$result = xmlrpc_server_call($xmlrpc_server, $method, $params);
}
if ($result->is_error) {
$return[] = array(
'faultCode' => $result->code,
'faultString' => $result->message,
);
}
else {
$return[] = $result;
}
}
return $return;
}