BUGFIX: Fixed Permission::get_members_by_permission() for DB abstractions (from r97653)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102523 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-12 23:08:59 +00:00
parent 2ff50a6fe9
commit fdce2dfc22

View File

@ -451,12 +451,12 @@ class Permission extends DataObject {
// Via Roles are groups that have the permission via a role
return DataObject::get('Group',
"PermissionRoleCode.`Code` IN ('$SQL_codes') OR Permission.`Code` IN ('$SQL_codes')",
"\"PermissionRoleCode\".\"Code\" IN ('$SQL_codes') OR \"Permission\".\"Code\" IN ('$SQL_codes')",
"",
"LEFT JOIN Permission ON Permission.GroupID = `Group`.ID
LEFT JOIN Group_Roles ON Group_Roles.GroupID = `Group`.ID
LEFT JOIN PermissionRole ON Group_Roles.PermissionRoleID = PermissionRole.ID
LEFT JOIN PermissionRoleCode ON PermissionRoleCode.RoleID = PermissionRole.ID");
"LEFT JOIN \"Permission\" ON \"Permission\".\"GroupID\" = \"Group\".\"ID\"
LEFT JOIN \"Group_Roles\" ON \"Group_Roles\".\"GroupID\" = \"Group\".\"ID\"
LEFT JOIN \"PermissionRole\" ON \"Group_Roles\".\"PermissionRoleID\" = \"PermissionRole\".\"ID\"
LEFT JOIN \"PermissionRoleCode\" ON \"PermissionRoleCode\".\"RoleID\" = \"PermissionRole\".\"ID\"");
}