mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Formatting in Group.php
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65124 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c573d51d4c
commit
5556e1f5ae
@ -199,15 +199,18 @@ class Group extends DataObject {
|
||||
|
||||
/**
|
||||
* Return a set of this record's "family" of IDs - the IDs of
|
||||
* this record and all its descendants
|
||||
* this record and all its descendants.
|
||||
* @return array
|
||||
*/
|
||||
public function collateFamilyIDs() {
|
||||
$familyIDs = array();
|
||||
$chunkToAdd = array(array("ID" => $this->ID));
|
||||
|
||||
while($chunkToAdd) {
|
||||
$idList = null;
|
||||
foreach($chunkToAdd as $item) {
|
||||
$idList[] = $family[] = $item['ID'];
|
||||
$idList[] = $item['ID'];
|
||||
$familyIDs[] = $item['ID'];
|
||||
}
|
||||
$idList = implode(',',$idList);
|
||||
|
||||
@ -218,7 +221,7 @@ class Group extends DataObject {
|
||||
if(!$chunkToAdd->numRecords()) $chunkToAdd = null;
|
||||
}
|
||||
|
||||
return $family;
|
||||
return $familyIDs;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user