Code

Fixed printer problem
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Apr 2008 12:01:48 +0000 (12:01 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 16 Apr 2008 12:01:48 +0000 (12:01 +0000)
-Selected users/groups were not shown sometimes.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10504 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/systems/goto/class_printGeneric.inc

index bd52510615586c5a0b040746250ca6e9ecf969fa..d2b3af58c071a1491980767fd8185679caab1daa 100644 (file)
@@ -122,12 +122,11 @@ class printgeneric extends plugin
       /* $this->members contains all members */
       $this->member[$type]=array();
 
-      if (isset($this->attrs[$attr]['count'])) {
-        unset($this->attrs[$attr]['count']);
-      }
-
       if(isset($this->attrs[$attr])){
-        foreach($this->attrs[$attr] as $mem){
+        $ldap->cd($this->config->current['BASE']) ;
+        for($i = 0 ;  $i < $this->attrs[$attr]['count']; $i++){
+        
+          $mem = $this->attrs[$attr][$i];
           if(preg_match("/Group/",$type)){
             $ldap->search("(&(objectClass=posixGroup)(cn=".$mem."))",array("cn","description"));
             if($ldap->count()){