Code

Updated object group member handling
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Apr 2010 13:56:34 +0000 (13:56 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 Apr 2010 13:56:34 +0000 (13:56 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17889 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/ogroups/class_ogroup.inc
gosa-core/plugins/admin/ogroups/generic.tpl

index dce0461ecb1a6333e583630cce58bf39b5fa8fcb..e3f3768fe286c87eafe0b2f4d6b5a377785ba203 100644 (file)
@@ -191,6 +191,12 @@ class ogroup extends plugin
         $objects = $this->objectSelect->save();
         $skipped = FALSE;
         foreach($objects as $object){
+          $dn = $object['dn'];
+
+          // Do not add existing members twice!
+          if(isset($this->member["$dn"])){
+              continue;
+          }
 
           $tmp = "";
           foreach($this->memberList as $obj){
@@ -199,7 +205,6 @@ class ogroup extends plugin
 
           $type  = $this->getObjectType($object);
           $name= $this->getObjectName($object);
-          $dn = $object['dn'];
 
           /* Fill array */
           if (isset($object["description"][0])){
index 2670e1503b313e52793c6d116fce19f1828a0466..34b4d8c2a093a4a023097f0092f14cd49b1c5908 100644 (file)
@@ -43,7 +43,6 @@
 {render acl=$memberACL}
    {$memberList}
 {/render}
-   <br>
 {render acl=$memberACL}
    <button type='submit' name='edit_membership'>{msgPool type=addButton}</button>&nbsp;
 {/render}