From: psc Date: Tue, 4 May 2010 09:56:29 +0000 (+0000) Subject: Bugfix for #4721 X-Git-Url: https://git.tokkee.org/?p=gosa.git;a=commitdiff_plain;h=91469489a819afc65b191fe090f5d06aaa4af5b8 Bugfix for #4721 Before creating multiple events filter duplicates. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6-lhm@18032 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc b/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc index b255b1a2d..13f80c9dc 100644 --- a/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc +++ b/trunk/gosa-plugins/goto/addons/goto/events/class_DaemonEvent.inc @@ -431,6 +431,17 @@ class DaemonEvent if($dialog->multiple_events) { $event_type = get_class($dialog); $targets = $dialog->get_targets(); + $tmp_array[0] = $targets[0]; + foreach ($targets as $current) { + $add_flag = 1; + foreach ($tmp_array as $tmp) { + if ($current["mac"]==$tmp["mac"]) { + $add_flag = 0; break; + } + } + if ($add_flag) $tmp_array[] = $current; + } + $targets = $tmp_array; $timestamp = $dialog->timestamp; $i = 1;