Skip to content

Commit

Permalink
MDL-62384 logstore_standard: Remove unnecessary join on context
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed May 11, 2018
1 parent 0370272 commit 09f9af4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions admin/tool/log/store/standard/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ public static function get_metadata(collection $collection) : collection {
*/
public static function add_contexts_for_userid(contextlist $contextlist, $userid) {
$sql = "
SELECT ctx.id
FROM {context} ctx
JOIN {logstore_standard_log} l
ON l.contextid = ctx.id
SELECT l.contextid
FROM {logstore_standard_log} l
WHERE l.userid = :userid1
OR l.relateduserid = :userid2
OR l.realuserid = :userid3";
Expand Down

0 comments on commit 09f9af4

Please sign in to comment.