From 00e5caf49c2e6c788b21fa65ee0baebabef43e27 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 27 Jan 2010 07:04:36 +0000 Subject: [PATCH] BUGFIX: Fixed Permission::get_members_by_permission() for DB abstractions git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@97653 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 04d7e07b5..6768c9221 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\""); }