From 3fd2cea285d9bab567b4f65369c0c3e8ff16f6c8 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Mon, 26 Oct 2009 22:04:50 +0000 Subject: [PATCH] BUGFIX: Updated module to support 2.4 API changes --- code/FileSubsites.php | 2 +- code/GroupSubsites.php | 2 +- code/SiteTreeSubsites.php | 2 +- code/Subsite.php | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/FileSubsites.php b/code/FileSubsites.php index 77c28c4..2d84459 100755 --- a/code/FileSubsites.php +++ b/code/FileSubsites.php @@ -49,7 +49,7 @@ class FileSubsites extends DataObjectDecorator { // The foreach is an ugly way of getting the first key :-) foreach($query->from as $tableName => $info) { $where = "`$tableName`.SubsiteID IN (0, $subsiteID)"; - if(defined('Database::USE_ANSI_SQL')) { + if(defined('DB::USE_ANSI_SQL')) { $where = "\"$tableName\".\"SubsiteID\" IN (0, $subsiteID)"; } diff --git a/code/GroupSubsites.php b/code/GroupSubsites.php index 5ce0cb8..99f80e6 100644 --- a/code/GroupSubsites.php +++ b/code/GroupSubsites.php @@ -78,7 +78,7 @@ class GroupSubsites extends DataObjectDecorator { // The foreach is an ugly way of getting the first key :-) foreach($query->from as $tableName => $info) { $where = "`$tableName`.SubsiteID IN (0, $subsiteID)"; - if(defined('Database::USE_ANSI_SQL')) { + if(defined('DB::USE_ANSI_SQL')) { $where = "\"$tableName\".\"SubsiteID\" IN (0, $subsiteID)"; } diff --git a/code/SiteTreeSubsites.php b/code/SiteTreeSubsites.php index 67590f9..06237d1 100644 --- a/code/SiteTreeSubsites.php +++ b/code/SiteTreeSubsites.php @@ -64,7 +64,7 @@ class SiteTreeSubsites extends DataObjectDecorator { // The foreach is an ugly way of getting the first key :-) foreach($query->from as $tableName => $info) { $where = "`$tableName`.SubsiteID IN ($subsiteID)"; - if(defined('Database::USE_ANSI_SQL')) { + if(defined('DB::USE_ANSI_SQL')) { $where = "\"$tableName\".\"SubsiteID\" IN ($subsiteID)"; } diff --git a/code/Subsite.php b/code/Subsite.php index d7032e5..06711e9 100644 --- a/code/Subsite.php +++ b/code/Subsite.php @@ -340,7 +340,7 @@ JS; $SQL_permissionCodes = join("','", $SQL_permissionCodes); - if(defined('Database::USE_ANSI_SQL')) { + if(defined('DB::USE_ANSI_SQL')) { return DataObject::get( 'Member', "\"Group\".\"SubsiteID\" = $this->ID AND \"Permission\".\"Code\" IN ('$SQL_permissionCodes')", @@ -374,7 +374,7 @@ JS; return DataObject::get('Subsite'); } - if(defined('Database::USE_ANSI_SQL')) { + if(defined('DB::USE_ANSI_SQL')) { return DataObject::get( 'Subsite', "\"MemberID\" = {$member->ID}", @@ -409,7 +409,7 @@ JS; $SQL_perms = join("','", $SQLa_perm); $memberID = (int)$member->ID; - if(defined('Database::USE_ANSI_SQL')) { + if(defined('DB::USE_ANSI_SQL')) { $groupCount = DB::query(" SELECT COUNT(\"Permission\".\"ID\") FROM \"Permission\" @@ -493,7 +493,7 @@ JS; $templateClassList = "'" . implode("', '", ClassInfo::subclassesFor("Subsite_Template")) . "'"; - if(defined('Database::USE_ANSI_SQL')) { + if(defined('DB::USE_ANSI_SQL')) { return DataObject::get( 'Subsite', "\"Group_Members\".\"MemberID\" = $member->ID