Code

Initial scalix plugin
[gosa.git] / plugins / admin / ogroups / tabs_ogroups.inc
index 89bcd1b9eb307c9129c866c4f800d64d3e79d47f..d0659618d68230ddc83ebc75b9292e4fb2867a00 100644 (file)
@@ -11,9 +11,10 @@ class ogrouptabs extends tabs
      * but there is no user left with goPhoneAccount ... remove it.
      */
     $usePhoneTab = false;
+    $o_cache = $this->by_object['ogroup']->objcache;
     foreach($this->by_object['ogroup']->memberList as $dn => $val){
-      if(isset($val['objectClass'])){
-        if(in_array("goFonAccount",$val['objectClass'])){
+      if(isset($o_cache[$dn]['objectClass'])){
+        if(in_array("goFonAccount",$o_cache[$dn]['objectClass'])){
           $usePhoneTab = true;
         }
       }
@@ -53,10 +54,11 @@ class ogrouptabs extends tabs
     /* Create goPhoneAccount if theres an user with goPhoneAccount
      * but only if there is currently no queue enabled.
      */
+    $o_cache = $this->by_object['ogroup']->objcache;
     if(!isset($this->by_object['phonequeue'])){
       foreach($this->by_object['ogroup']->memberList as $dn => $val){
-        if(isset($val['objectClass'])){
-          if(in_array("goFonAccount",$val['objectClass'])){
+        if(isset($o_cache[$dn]['objectClass'])){
+          if(in_array("goFonAccount",$o_cache[$dn]['objectClass'])){
             require_once("class_phonequeue.inc");
             $this->by_name['phonequeue']= _("Phone queue");
             $this->by_object['phonequeue']= new phonequeue($this->config, $this->dn);
@@ -151,9 +153,10 @@ class ogrouptabs extends tabs
           case "U":
             /* Append a PhoneQueue, if objectClass = goFonAccount */
             $use = false;
+          $o_cache = $this->by_object['ogroup']->objcache;
           foreach($this->by_object['ogroup']->memberList as $dn => $val){
-            if(isset($val['objectClass'])){
-              if(in_array("goFonAccount",$val['objectClass'])){
+            if(isset($o_cache[$dn]['objectClass'])){
+              if(in_array("goFonAccount",$o_cache[$dn]['objectClass'])){
                 $use = true; 
               }
             }