mod/cp_notifications/lib/functions.php 1 location
|
@@ 10-17 (lines=8) @@
|
| 7 |
|
* @param integer $entity_guid |
| 8 |
|
* |
| 9 |
|
*/ |
| 10 |
|
function get_forum_in_group($entity_guid_static, $entity_guid) { |
| 11 |
|
$entity = get_entity($entity_guid); |
| 12 |
|
// (base) stop recursing when we reach group guid |
| 13 |
|
if ($entity instanceof ElggGroup) |
| 14 |
|
return $entity_guid; |
| 15 |
|
else |
| 16 |
|
return get_forum_in_group($entity_guid_static, $entity->getContainerGUID()); |
| 17 |
|
} |
| 18 |
|
|
| 19 |
|
|
| 20 |
|
/** |
mod/gcforums/start.php 1 location
|
@@ 133-140 (lines=8) @@
|
| 130 |
|
* recursively go through the forums and return group entity |
| 131 |
|
* @return integer |
| 132 |
|
*/ |
| 133 |
|
function gcforums_get_forum_in_group($entity_guid_static, $entity_guid) |
| 134 |
|
{ |
| 135 |
|
$entity = get_entity($entity_guid); |
| 136 |
|
// (base) stop recursing when we reach group guid |
| 137 |
|
if ($entity instanceof ElggGroup) { |
| 138 |
|
return $entity_guid; |
| 139 |
|
} else { |
| 140 |
|
return gcforums_get_forum_in_group($entity_guid_static, $entity->getContainerGUID()); |
| 141 |
|
} |
| 142 |
|
} |
| 143 |
|
|