1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Fixed endless recursion of DDC-719 test.

This commit is contained in:
Guilherme Blanco 2011-05-14 00:49:46 -03:00
parent 551247d11a
commit f4d62b317e

View File

@ -77,21 +77,23 @@ class DDC719Group extends Entity {
* adds group as new child
*
* @param Group $child
* @todo check against endless recursion
* @todo check if the group is already member of the group
*/
public function addGroup(Group $child) {
$this->children->add($child);
if ( ! $this->children->contains($child)) {
$this->children->add($child);
$child->addGroup($this);
}
}
/**
* adds channel as new child
*
* @param Channel $child
* @todo check if the channel is already member of the group
*/
public function addChannel(Channel $child) {
$this->channels->add($child);
if ( ! $this->channels->contains($child)) {
$this->channels->add($child);
}
}
/**