mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
MDL-63785 core_repository: performance improvement
This commit is contained in:
parent
d4269920de
commit
6b20a81cb4
@ -109,15 +109,10 @@ class provider implements
|
||||
return;
|
||||
}
|
||||
|
||||
$params = [
|
||||
'contextid' => $context->id,
|
||||
'contextuser' => CONTEXT_USER,
|
||||
];
|
||||
|
||||
$sql = "SELECT c.instanceid as userid
|
||||
FROM {repository_instances} ri
|
||||
JOIN {context} c ON c.instanceid = ri.userid AND c.contextlevel = :contextuser
|
||||
WHERE c.id = :contextid";
|
||||
$sql = "SELECT userid
|
||||
FROM {repository_instances}
|
||||
WHERE userid = ?";
|
||||
$params = [$context->instanceid];
|
||||
|
||||
$userlist->add_from_sql('userid', $sql, $params);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user