From: hickert Date: Wed, 10 Jan 2007 06:39:30 +0000 (+0000) Subject: Udpated ogroup queues . X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e24e563ae3790849ec3a1891b5c6ac1599ec7ecd;p=gosa.git Udpated ogroup queues . Only users with same home server will be included as queue member git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5502 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/ogroups/class_phonequeue.inc b/plugins/admin/ogroups/class_phonequeue.inc index 7861cbde1..2a2b1ad9c 100644 --- a/plugins/admin/ogroups/class_phonequeue.inc +++ b/plugins/admin/ogroups/class_phonequeue.inc @@ -530,10 +530,22 @@ class phonequeue extends plugin $queueuser =array(); $i = 0; $parent = $this->parent->by_object['ogroup']; + + + $ldap = $this->config->get_ldap_link(); foreach($parent->memberList as $member => $mem_data){ - $obj = $parent->objcache[$member]; - if(isset($obj['objectClass'])){ - if(in_array("goFonAccount",$obj['objectClass'])){ + $ldap->cat($member,array("goFonHomeServer","objectClass","dn","uid")); + if($ldap->count()){ + + $obj = $ldap->fetch(); + + /* Calculate server and account dependencies */ + $is_acc = in_array("goFonAccount",$obj['objectClass']); + $is_home= isset($obj['goFonHomeServer'][0]) && $obj['goFonHomeServer'][0] == $this->goFonHomeServer; + + /* Append user to list of queue member, + * only if user has phoneAccount extension && is on same home server */ + if($is_acc && $is_home){ $i ++ ; $queueuser[$i]['queue_name'] = $this->cn; $queueuser[$i]['interface'] = "SIP/".$obj['uid'][0]; diff --git a/plugins/admin/ogroups/phonequeue.tpl b/plugins/admin/ogroups/phonequeue.tpl index 5f4d59c69..02e671f0f 100644 --- a/plugins/admin/ogroups/phonequeue.tpl +++ b/plugins/admin/ogroups/phonequeue.tpl @@ -1,3 +1,7 @@ +

+ ! {t}Only users with the same asterisk home server will be included to this queue.{/t} +

+