mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR: Use leftJoin() / innerJoin() instead of join().
This commit is contained in:
parent
3acffaa5bb
commit
1f34973da1
@ -1096,13 +1096,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
||||
);
|
||||
|
||||
// Get the uninherited permissions
|
||||
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(\"$typeField\" = 'LoggedInUsers' OR
|
||||
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage)
|
||||
->where("(\"$typeField\" = 'LoggedInUsers' OR
|
||||
(\"$typeField\" = 'OnlyTheseUsers' AND \"$groupJoinTable\".\"SiteTreeID\" IS NOT NULL))
|
||||
AND \"SiteTree\".\"ID\" IN ($SQL_idList)",
|
||||
"",
|
||||
"LEFT JOIN \"$groupJoinTable\"
|
||||
ON \"$groupJoinTable\".\"SiteTreeID\" = \"SiteTree\".\"ID\"
|
||||
AND \"$groupJoinTable\".\"GroupID\" IN ($SQL_groupList)");
|
||||
AND \"SiteTree\".\"ID\" IN ($SQL_idList)")
|
||||
->leftJoin($groupJoinTable, "\"$groupJoinTable\".\"SiteTreeID\" = \"SiteTree\".\"ID\" AND \"$groupJoinTable\".\"GroupID\" IN ($SQL_groupList)");
|
||||
|
||||
if($uninheritedPermissions) {
|
||||
// Set all the relevant items in $result to true
|
||||
|
Loading…
Reference in New Issue
Block a user