Code

Set base corretly.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 6 Oct 2006 06:50:39 +0000 (06:50 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 6 Oct 2006 06:50:39 +0000 (06:50 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4861 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/ogroups/class_ogroup.inc

index 4552807b8f4c189c3b7d10267fbcde17cbd19826..45a9b06be81afac68050a0380c3907885e109594 100644 (file)
@@ -80,17 +80,19 @@ class ogroup extends plugin
       }
     }
     register_global("ogfilter", $ogfilter);
-  
-    if(isset($_SESSION['CurrentMainBase'])){
-     $this->base = $_SESSION['CurrentMainBase'];
+    /* Set base */
+    if ($this->dn == "new"){
+      $this->base= $_SESSION['CurrentMainBase'];
+    } else {
+      $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
     }
 
-     /* set permissions */
+    /* set permissions */
     $ui= get_userinfo();
     $acl= get_permissions ($ui->dn, $ui->subtreeACL);
     $this->acl= get_module_permission($acl, "ogroup", $ui->dn);
 
-
     /* Load member data */
     $this->reload();
   }