mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
FIXED: collateFamilyIDs() nested groups throws error
http://open.silverstripe.org/ticket/7835
This commit is contained in:
parent
7a8c35f4e3
commit
399b2a23da
@ -271,15 +271,11 @@ class Group extends DataObject {
|
||||
*/
|
||||
public function collateFamilyIDs() {
|
||||
$familyIDs = array();
|
||||
$chunkToAdd = array(array("ID" => $this->ID));
|
||||
$chunkToAdd = array($this->ID);
|
||||
|
||||
while($chunkToAdd) {
|
||||
$idList = array();
|
||||
foreach($chunkToAdd as $item) {
|
||||
$idList[] = $item['ID'];
|
||||
$familyIDs[] = $item['ID'];
|
||||
}
|
||||
$idList = implode(',', $idList);
|
||||
$familyIDs = array_merge($familyIDs,$chunkToAdd);
|
||||
$idList = implode(',', $chunkToAdd);
|
||||
|
||||
// Get the children of *all* the groups identified in the previous chunk.
|
||||
// This minimises the number of SQL queries necessary
|
||||
|
Loading…
x
Reference in New Issue
Block a user