BUGFIX: Updated module to support 2.4 API changes

This commit is contained in:
Sam Minnee 2009-10-26 22:04:50 +00:00
parent 9b1fae7901
commit 3fd2cea285
4 changed files with 7 additions and 7 deletions

View File

@ -49,7 +49,7 @@ class FileSubsites extends DataObjectDecorator {
// The foreach is an ugly way of getting the first key :-) // The foreach is an ugly way of getting the first key :-)
foreach($query->from as $tableName => $info) { foreach($query->from as $tableName => $info) {
$where = "`$tableName`.SubsiteID IN (0, $subsiteID)"; $where = "`$tableName`.SubsiteID IN (0, $subsiteID)";
if(defined('Database::USE_ANSI_SQL')) { if(defined('DB::USE_ANSI_SQL')) {
$where = "\"$tableName\".\"SubsiteID\" IN (0, $subsiteID)"; $where = "\"$tableName\".\"SubsiteID\" IN (0, $subsiteID)";
} }

View File

@ -78,7 +78,7 @@ class GroupSubsites extends DataObjectDecorator {
// The foreach is an ugly way of getting the first key :-) // The foreach is an ugly way of getting the first key :-)
foreach($query->from as $tableName => $info) { foreach($query->from as $tableName => $info) {
$where = "`$tableName`.SubsiteID IN (0, $subsiteID)"; $where = "`$tableName`.SubsiteID IN (0, $subsiteID)";
if(defined('Database::USE_ANSI_SQL')) { if(defined('DB::USE_ANSI_SQL')) {
$where = "\"$tableName\".\"SubsiteID\" IN (0, $subsiteID)"; $where = "\"$tableName\".\"SubsiteID\" IN (0, $subsiteID)";
} }

View File

@ -64,7 +64,7 @@ class SiteTreeSubsites extends DataObjectDecorator {
// The foreach is an ugly way of getting the first key :-) // The foreach is an ugly way of getting the first key :-)
foreach($query->from as $tableName => $info) { foreach($query->from as $tableName => $info) {
$where = "`$tableName`.SubsiteID IN ($subsiteID)"; $where = "`$tableName`.SubsiteID IN ($subsiteID)";
if(defined('Database::USE_ANSI_SQL')) { if(defined('DB::USE_ANSI_SQL')) {
$where = "\"$tableName\".\"SubsiteID\" IN ($subsiteID)"; $where = "\"$tableName\".\"SubsiteID\" IN ($subsiteID)";
} }

View File

@ -340,7 +340,7 @@ JS;
$SQL_permissionCodes = join("','", $SQL_permissionCodes); $SQL_permissionCodes = join("','", $SQL_permissionCodes);
if(defined('Database::USE_ANSI_SQL')) { if(defined('DB::USE_ANSI_SQL')) {
return DataObject::get( return DataObject::get(
'Member', 'Member',
"\"Group\".\"SubsiteID\" = $this->ID AND \"Permission\".\"Code\" IN ('$SQL_permissionCodes')", "\"Group\".\"SubsiteID\" = $this->ID AND \"Permission\".\"Code\" IN ('$SQL_permissionCodes')",
@ -374,7 +374,7 @@ JS;
return DataObject::get('Subsite'); return DataObject::get('Subsite');
} }
if(defined('Database::USE_ANSI_SQL')) { if(defined('DB::USE_ANSI_SQL')) {
return DataObject::get( return DataObject::get(
'Subsite', 'Subsite',
"\"MemberID\" = {$member->ID}", "\"MemberID\" = {$member->ID}",
@ -409,7 +409,7 @@ JS;
$SQL_perms = join("','", $SQLa_perm); $SQL_perms = join("','", $SQLa_perm);
$memberID = (int)$member->ID; $memberID = (int)$member->ID;
if(defined('Database::USE_ANSI_SQL')) { if(defined('DB::USE_ANSI_SQL')) {
$groupCount = DB::query(" $groupCount = DB::query("
SELECT COUNT(\"Permission\".\"ID\") SELECT COUNT(\"Permission\".\"ID\")
FROM \"Permission\" FROM \"Permission\"
@ -493,7 +493,7 @@ JS;
$templateClassList = "'" . implode("', '", ClassInfo::subclassesFor("Subsite_Template")) . "'"; $templateClassList = "'" . implode("', '", ClassInfo::subclassesFor("Subsite_Template")) . "'";
if(defined('Database::USE_ANSI_SQL')) { if(defined('DB::USE_ANSI_SQL')) {
return DataObject::get( return DataObject::get(
'Subsite', 'Subsite',
"\"Group_Members\".\"MemberID\" = $member->ID "\"Group_Members\".\"MemberID\" = $member->ID