mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
MINOR Whitespace fixes
This commit is contained in:
parent
acbfe35f4d
commit
11fc7dab8b
@ -43,8 +43,8 @@ class FileSubsites extends DataObjectDecorator {
|
|||||||
// If you're querying by ID, ignore the sub-site - this is a bit ugly...
|
// If you're querying by ID, ignore the sub-site - this is a bit ugly...
|
||||||
if(strpos($query->where[0], ".`ID` = ") === false && strpos($query->where[0], ".ID = ") === false) {
|
if(strpos($query->where[0], ".`ID` = ") === false && strpos($query->where[0], ".ID = ") === false) {
|
||||||
|
|
||||||
if($context = DataObject::context_obj()) $subsiteID = (int)$context->SubsiteID;
|
if($context = DataObject::context_obj()) $subsiteID = (int) $context->SubsiteID;
|
||||||
else $subsiteID = (int)Subsite::currentSubsiteID();
|
else $subsiteID = (int) Subsite::currentSubsiteID();
|
||||||
|
|
||||||
// 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) {
|
||||||
@ -56,8 +56,8 @@ class FileSubsites extends DataObjectDecorator {
|
|||||||
$query->where[] = $where;
|
$query->where[] = $where;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query->orderby = 'SubsiteID' . ($query->orderby ? ', ' : '') . $query->orderby;
|
$query->orderby = 'SubsiteID' . ($query->orderby ? ', ' : '') . $query->orderby;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,8 +72,8 @@ class GroupSubsites extends DataObjectDecorator {
|
|||||||
// If you're querying by ID, ignore the sub-site - this is a bit ugly...
|
// If you're querying by ID, ignore the sub-site - this is a bit ugly...
|
||||||
if(!$query->where || (strpos($query->where[0], ".\"ID\" = ") === false && strpos($query->where[0], ".`ID` = ") === false && strpos($query->where[0], ".ID = ") === false)) {
|
if(!$query->where || (strpos($query->where[0], ".\"ID\" = ") === false && strpos($query->where[0], ".`ID` = ") === false && strpos($query->where[0], ".ID = ") === false)) {
|
||||||
|
|
||||||
if($context = DataObject::context_obj()) $subsiteID = (int)$context->SubsiteID;
|
if($context = DataObject::context_obj()) $subsiteID = (int) $context->SubsiteID;
|
||||||
else $subsiteID = (int)Subsite::currentSubsiteID();
|
else $subsiteID = (int) Subsite::currentSubsiteID();
|
||||||
|
|
||||||
// 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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user