Merge branch 'MDL-51700-master' of git://github.com/FMCorz/moodle

This commit is contained in:
Dan Poltawski 2015-12-02 10:31:10 +00:00 committed by Eloy Lafuente (stronk7)
commit 53907dbee5
2 changed files with 9 additions and 0 deletions

View File

@ -82,6 +82,12 @@ foreach ($requests as $request) {
$result = call_user_func_array($callable,
array_values($params));
// Validate the return parameters.
if ($externalfunctioninfo->returns_desc !== null) {
$callable = array($externalfunctioninfo->classname, 'clean_returnvalue');
$result = call_user_func($callable, $externalfunctioninfo->returns_desc, $result);
}
$response['error'] = false;
$response['data'] = $result;
$responses[$index] = $response;

View File

@ -8,6 +8,9 @@ information provided here is intended especially for developers.
context_user $context, stdClass $course,
context_course $coursecontext)
* The function notify() now throws a debugging message - see MDL-50269.
* Ajax calls going through lib/ajax/* now validate the return values before sending
the response. If the validation does not pass an exception is raised. This behaviour
is consistent with web services.
=== 3.0 ===