mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
MDL-63785 block_rss_client: performance improvement
This commit is contained in:
parent
a6d0837e18
commit
66e15651fe
@ -98,18 +98,10 @@ class provider implements
|
||||
return;
|
||||
}
|
||||
|
||||
$params = [
|
||||
'contextid' => $context->id,
|
||||
'contextuser' => CONTEXT_USER,
|
||||
];
|
||||
|
||||
$sql = "SELECT brc.userid as userid
|
||||
FROM {block_rss_client} brc
|
||||
JOIN {context} ctx
|
||||
ON ctx.instanceid = brc.userid
|
||||
AND ctx.contextlevel = :contextuser
|
||||
WHERE ctx.id = :contextid";
|
||||
|
||||
$sql = "SELECT userid
|
||||
FROM {block_rss_client}
|
||||
WHERE userid = ?";
|
||||
$params = [$context->instanceid];
|
||||
$userlist->add_from_sql('userid', $sql, $params);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user