Code

Fixed grouptabs
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Mar 2006 09:04:45 +0000 (09:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Mar 2006 09:04:45 +0000 (09:04 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2799 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/groups/tabs_group.inc

index 8545c60a997afb8d7ceb7b3c2bbc1cd4c9627b1f..9205244d5c80af7909f92b587851d65dbe62cb9b 100644 (file)
@@ -3,66 +3,65 @@
 class grouptabs extends tabs
 {
 
-  function grouptabs($config, $data, $dn)
-  {
-       tabs::tabs($config, $data, $dn);
-  }
+       function grouptabs($config, $data, $dn)
+       {
+               tabs::tabs($config, $data, $dn);
+       }
 
-  function save_object($save_current= FALSE)
-  {
-        tabs::save_object($save_current);
+       function save_object($save_current= FALSE)
+       {
+               tabs::save_object($save_current);
 
-        /* Update reference, transfer variables */
-        $baseobject= $this->by_object['group'];
-        foreach ($this->by_object as $name => $obj){
-                /* Don't touch base object */
-                if ($name != 'group'){
-                        $obj->parent= &$this;
-                        $obj->cn= $baseobject->cn;
-                        $this->by_object[$name]= $obj;
-                }
-        }
-  }
+               /* Update reference, transfer variables */
+               $baseobject= $this->by_object['group'];
+               foreach ($this->by_object as $name => $obj){
+                       /* Don't touch base object */
+                       if ($name != 'group'){
+                               $obj->parent= &$this;
+                               $obj->cn= $baseobject->cn;
+                               $this->by_object[$name]= $obj;
+                       }
+               }
+       }
 
-  function save()
-  {
-       $baseobject= $this->by_object['group'];
+       function save()
+       {
+               $baseobject= $this->by_object['group'];
 
-       /* Check for new 'dn', in order to propagate the
-          'dn' to all plugins */
-       $new_dn= 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
+               /* Check for new 'dn', in order to propagate the
+                  'dn' to all plugins */
+               $new_dn= 'cn='.$baseobject->cn.','.get_groups_ou().$baseobject->base;
+
+               /* Put baseobjects 'cn' to mailobjects 'uid' */
+               if (isset($this->by_object['mailgroup'])){
+                       $this->by_object['mailgroup']->uid= $baseobject->cn;
+               }
 
-       /* Put baseobjects 'cn' to mailobjects 'uid' */
-       if (isset($this->by_object['mailgroup'])){
-               $this->by_object['mailgroup']->uid= $baseobject->cn;
-       }
 
+               /* Update reference, transfer variables */
+               foreach ($this->by_object as $name => $obj){
+                       /* Transfer attributes for mailgroup account */
+                       if ($name == 'mailgroup'){
+                               $this->by_object['mailgroup']->members= $baseobject->memberUid;;
+                       }
+               }
 
-       /* Update reference, transfer variables */
-        foreach ($this->by_object as $name => $obj){
-                /* Transfer attributes for mailgroup account */
-                if ($name == 'mailgroup'){
-                        $obj->members= $baseobject->memberUid;
-                       $this->by_object['mailgroup']= $obj;
-                }
-        }
+               /* Move group? */
+               if ($this->dn != $new_dn){
 
-       /* Move group? */
-       if ($this->dn != $new_dn){
+                       /* Write entry on new 'dn' */
+                       if ($this->dn != "new"){
+                               $baseobject->move($this->dn, $new_dn);
+                               $this->by_object['group']= $baseobject;
+                       }
 
-               /* Write entry on new 'dn' */
-               if ($this->dn != "new"){
-                       $baseobject->move($this->dn, $new_dn);
-                       $this->by_object['group']= $baseobject;
+                       /* Happen to use the new one */
+                       $this->dn= $new_dn;
                }
 
-               /* Happen to use the new one */
-               $this->dn= $new_dn;
+               return tabs::save();
        }
 
-       return tabs::save();
-  }
-
 }
 
 ?>