From fdce2dfc2287194b45b28c306eb0fa6609cb3ef4 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 12 Apr 2010 23:08:59 +0000 Subject: [PATCH] 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 --- security/Permission.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/security/Permission.php b/security/Permission.php index 09519de06..140926e58 100755 --- a/security/Permission.php +++ b/security/Permission.php @@ -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\""); }