Code

Fixed error FAIscript (invalid attribute )
[gosa.git] / plugins / admin / systems / class_systemManagement.inc
index b64fb5e777f8984cbf0b389d3edb690b0eba7a44..7f7265767d0893e8d8217843fcebc8057dbb38d7 100644 (file)
@@ -875,7 +875,15 @@ class systems extends plugin
      * We also need to search for the departments
      * So we are able to navigate like in konquerer
      */
-    $base2 = preg_replace("/ou=people,/i","",$base);
+
+    $peopleOU = get_people_ou();
+
+    if(empty($peopleOU)){
+      $base2 = $base;
+    }else{
+      $base2 = preg_replace("/".$peopleOU."/i","",$base);
+    }
+
 
     $res3 =  get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
                               TRUE, $base2, array("ou", "description"), TRUE);