mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX: Updated module to support 2.4 API changes
This commit is contained in:
parent
9b1fae7901
commit
3fd2cea285
@ -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)";
|
||||
}
|
||||
|
||||
|
@ -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)";
|
||||
}
|
||||
|
||||
|
@ -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)";
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user