"REPOSITORY/MDL-13766, provide accepted_types when sending request"
This commit is contained in:
@@ -871,6 +871,7 @@ _client.login = function() {
|
||||
params['repo_id'] = _client.repositoryid;
|
||||
params['ctx_id'] = $context->id;
|
||||
params['sesskey']= '$sesskey';
|
||||
params['accepted_types'] = _client.accepted_types;
|
||||
_client.loading('load');
|
||||
var trans = YAHOO.util.Connect.asyncRequest('POST',
|
||||
'$CFG->httpswwwroot/repository/ws.php?action=sign', _client.req_cb, _client.postdata(params));
|
||||
|
||||
+2
-1
@@ -1481,7 +1481,8 @@ abstract class repository {
|
||||
$value->children = array_filter($value->children, array($this, 'filter'));
|
||||
}
|
||||
} else {
|
||||
if ($accepted_types == '*' || in_array('*', $accepted_types)) {
|
||||
if ($accepted_types == '*' or empty($accepted_types)
|
||||
or (is_array($accepted_types) and in_array('*', $accepted_types))) {
|
||||
$pass = true;
|
||||
} elseif (is_array($accepted_types)) {
|
||||
foreach ($accepted_types as $type) {
|
||||
|
||||
Reference in New Issue
Block a user