From 369f0b1f495a2073ae3ef10ed9ffc11ee7732714 Mon Sep 17 00:00:00 2001 From: hickert Date: Fri, 16 Sep 2005 09:10:47 +0000 Subject: [PATCH] Only add cn, 1 , goto , tele|1 only once, not for each phonenumber git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1375 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/ogroups/class_phonequeue.inc | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc index 1e81e0978..f688753ce 100644 --- a/plugins/admin/ogroups/class_phonequeue.inc +++ b/plugins/admin/ogroups/class_phonequeue.inc @@ -325,6 +325,9 @@ class phonequeue extends plugin $i = 0; + + $i_insert_only_once = false; + foreach($this->telephoneNumber as $num){ // If there are no member in a Queue @@ -332,12 +335,15 @@ class phonequeue extends plugin // A Queue is not deleted directly, it is stored until the o group is deleted - $a_ext[$i]['context'] = 'GOsa'; - $a_ext[$i]['exten'] = $this->attrs['cn'][0]; - $a_ext[$i]['priority'] = 1; - $a_ext[$i]['app'] = "Goto"; - $a_ext[$i]['appdata'] = $num."|1"; - $i ++ ; + if($i_insert_only_once == false){ + $i_insert_only_once = true; + $a_ext[$i]['context'] = 'GOsa'; + $a_ext[$i]['exten'] = $this->attrs['cn'][0]; + $a_ext[$i]['priority'] = 1; + $a_ext[$i]['app'] = "Goto"; + $a_ext[$i]['appdata'] = $num."|1"; + $i ++ ; + } if($queueusers == 0){ $a_ext[$i]['context'] = 'GOsa'; -- 2.30.2