From 3f4850c5e55b221492b02475bd9d182e8137dae3 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 26 Feb 2009 11:57:06 +0000 Subject: Fixed duplicate notifications. git-svn-id: https://code.elgg.org/elgg/trunk@2961 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/groups/start.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mod/groups/start.php') diff --git a/mod/groups/start.php b/mod/groups/start.php index 22c8cf0eb..094deb786 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -82,11 +82,18 @@ * */ function group_object_notifications($event, $object_type, $object) { + + static $flag; + if (!isset($flag)) $flag = 0; + if (is_callable('object_notifications')) if ($object instanceof ElggObject) { if ($object->getSubtype() == 'groupforumtopic') { //if ($object->countAnnotations('group_topic_post') > 0) { + if ($flag == 0) { + $flag = 1; object_notifications($event, $object_type, $object); + } //} } } -- cgit v1.2.3