Code

Groups / Ogroups / Departments will be created in the selected base
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Jul 2005 06:21:23 +0000 (06:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 29 Jul 2005 06:21:23 +0000 (06:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1033 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/departments/class_departmentGeneric.inc
plugins/admin/groups/class_groupGeneric.inc
plugins/admin/ogroups/class_ogroup.inc

index b31594617dce3532a83f0624b9ba0bfd5e5bc22f..243d1e921c3c7ee8845a759f27388bead2f8ce86 100644 (file)
@@ -53,7 +53,11 @@ class department extends plugin
        /* Set base */
         if ($this->dn == "new"){
                $ui= get_userinfo();
-               $this->base= dn2base($ui->dn);
+               if(isset($_SESSION['depfilter']['depselect'])){
+                       $this->base = $_SESSION['depfilter']['depselect'];
+               }else{
+                       $this->base= dn2base($ui->dn);
+               }
        } else {
                 $this->base= preg_replace ("/^[^,]+,/", "", $this->dn);
         }
index 39008f756ffcc67080432c4623f6e7f5af69bedb..52df6e02369d44cc8bd4e8795c04e192b975ed0f 100644 (file)
@@ -128,6 +128,20 @@ class group extends plugin
     }
     $gufilter= get_global('gufilter');
 
+      /* Bases / Departments */
+      
+    if(isset($_SESSION['groupfilter']['depselect'])){
+      $this->base = $_SESSION['groupfilter']['depselect'];
+    }else{
+      if ($this->dn == "new"){
+        $ui= get_userinfo();
+        $this->base= dn2base($ui->dn);
+      } else {
+        $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
+      }
+    }
+
+
     /* This is always an account */
     $this->is_account= TRUE;
     $this->reload();
@@ -230,13 +244,6 @@ class group extends plugin
     /* Bases / Departments */
     if (isset($_POST['base'])){
       $this->base= $_POST['base'];
-    } else {
-      if ($this->dn == "new"){
-        $ui= get_userinfo();
-        $this->base= dn2base($ui->dn);
-      } else {
-        $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
-      }
     }
 
     $smarty->assign("bases", $this->config->idepartments);
index c41fc5922cf1c8be318efebc33c4fd99dc594d3f..bbb1ada80b4feacde94928f4fa6b9f93ce13b901 100644 (file)
@@ -78,6 +78,10 @@ class ogroup extends plugin
       }
     }
     register_global("ogfilter", $ogfilter);
+  
+    if(isset($_SESSION['ogroupfilter']['depselect'])){
+     $this->base = $_SESSION['ogroupfilter']['depselect'];
+    }
 
     /* Load member data */
     $this->reload();
@@ -187,16 +191,10 @@ class ogroup extends plugin
     }
 
     /* Bases / Departments */
-    if ($this->dn == "new"){
-      $ui= get_userinfo();
-      $this->base= dn2base($ui->dn);
-    } else {
+   
       if (isset($_POST['base'])){
         $this->base= $_POST['base'];
-      } else {
-        $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
       }
-    }
 
     /* Assemble combine string */
     if ($this->gosaGroupObjects == "[]"){