Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
37bacdac
Commit
37bacdac
authored
15 years ago
by
Dries Buytaert
Browse files
Options
Downloads
Patches
Plain Diff
- Patch
#646678
by fgm: fixed incorrect multicall implementation.
parent
43089856
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
includes/xmlrpc.inc
+26
-9
26 additions, 9 deletions
includes/xmlrpc.inc
includes/xmlrpcs.inc
+1
-1
1 addition, 1 deletion
includes/xmlrpcs.inc
with
27 additions
and
10 deletions
includes/xmlrpc.inc
+
26
−
9
View file @
37bacdac
...
...
@@ -433,13 +433,15 @@ function xmlrpc_base64_get_xml($xmlrpc_base64) {
* An array of call arrays. Each call array follows the pattern of the single
* request: method name followed by the arguments to the method.
* @return
* For one request:
* Either the return value of the method on success, or FALSE.
* If FALSE is returned, see xmlrpc_errno() and xmlrpc_error_msg().
* For multiple requests:
* An array of results. Each result will either be the result
* returned by the method called, or an xmlrpc_error object if the call
* failed. See xmlrpc_error().
* Either the return value of the method on success, or FALSE. If FALSE is
* returned, see xmlrpc_errno() and xmlrpc_error_msg().
* - For a non-multicall request: the result just as if this had been a local
* function call.
* - For a multicall request: an array of results. Each result will either be
* a one-element array containing the result returned by the method called,
* or an xmlrpc_error object if the call failed.
*
* @see xmlrpc_error()
*/
function
_xmlrpc
()
{
$args
=
func_get_args
();
...
...
@@ -479,8 +481,23 @@ function _xmlrpc() {
xmlrpc_error
(
$message
->
fault_code
,
$message
->
fault_string
);
return
FALSE
;
}
// Message must be OK
return
$message
->
params
[
0
];
// We now know that the message is well-formed and a non-fault result.
if
(
$method
==
'system.multicall'
)
{
// Return per-method results or error objects.
$return
=
array
();
foreach
(
$message
->
params
[
0
]
as
$result
)
{
if
(
array_keys
(
$result
)
==
array
(
0
))
{
$return
[]
=
$result
[
0
];
}
else
{
$return
[]
=
xmlrpc_error
(
$result
[
'faultCode'
],
$result
[
'faultString'
]);
}
}
}
else
{
$return
=
$message
->
params
[
0
];
}
return
$return
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
includes/xmlrpcs.inc
+
1
−
1
View file @
37bacdac
...
...
@@ -235,7 +235,7 @@ function xmlrpc_server_multicall($methodcalls) {
);
}
else
{
$return
[]
=
$result
;
$return
[]
=
array
(
$result
)
;
}
}
return
$return
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment