MINOR: Use leftJoin() / innerJoin() instead of join().

This commit is contained in:
Sam Minnee 2011-10-29 17:40:31 +13:00
parent 3acffaa5bb
commit 1f34973da1

View File

@ -1096,13 +1096,11 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
); );
// Get the uninherited permissions // Get the uninherited permissions
$uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage, "(\"$typeField\" = 'LoggedInUsers' OR $uninheritedPermissions = Versioned::get_by_stage("SiteTree", $stage)
(\"$typeField\" = 'OnlyTheseUsers' AND \"$groupJoinTable\".\"SiteTreeID\" IS NOT NULL)) ->where("(\"$typeField\" = 'LoggedInUsers' OR
AND \"SiteTree\".\"ID\" IN ($SQL_idList)", (\"$typeField\" = 'OnlyTheseUsers' AND \"$groupJoinTable\".\"SiteTreeID\" IS NOT NULL))
"", AND \"SiteTree\".\"ID\" IN ($SQL_idList)")
"LEFT JOIN \"$groupJoinTable\" ->leftJoin($groupJoinTable, "\"$groupJoinTable\".\"SiteTreeID\" = \"SiteTree\".\"ID\" AND \"$groupJoinTable\".\"GroupID\" IN ($SQL_groupList)");
ON \"$groupJoinTable\".\"SiteTreeID\" = \"SiteTree\".\"ID\"
AND \"$groupJoinTable\".\"GroupID\" IN ($SQL_groupList)");
if($uninheritedPermissions) { if($uninheritedPermissions) {
// Set all the relevant items in $result to true // Set all the relevant items in $result to true