Code

Fixed ou=people zu get_people_ou
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Dec 2005 15:13:26 +0000 (15:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 14 Dec 2005 15:13:26 +0000 (15:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2312 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/addons/ldapmanager/class_exportxls.inc
plugins/admin/applications/class_applicationManagement.inc
plugins/admin/ogroups/class_ogroupManagement.inc
plugins/admin/systems/class_systemManagement.inc
plugins/admin/users/class_userManagement.inc
plugins/gofax/blocklists/class_blocklistManagement.inc
plugins/gofon/macro/class_gofonMacroManagement.inc

index 47a7870643d90a042bb5f280c7a5e82533fb3eee..ea03de074160914cb75db43b669ecf92e254c541 100644 (file)
@@ -65,7 +65,7 @@ class xlsexport extends plugin
 
     // Set values for optionlist in form
      $smarty->assign("deplist", $this->config->idepartments);
-     $smarty->assign("choicelist",array("ou=people,"=>"users" ,"ou=groups,"=>"groups" ,"ou=computers,ou=systems,"=>"computers","ou=servers,ou=systems,"=>"servers","dc=addressbook,"=>"addressbook"));
+     $smarty->assign("choicelist",array(get_people_ou()=>"users" ,"ou=groups,"=>"groups" ,"ou=computers,ou=systems,"=>"computers","ou=servers,ou=systems,"=>"servers","dc=addressbook,"=>"addressbook"));
 
     // Get the LDAP link, to generate the Export
     $ldap = $this->config->get_ldap_link();
index 8bdc6bbe93024e8b62b74c587e9aa66603bf1ac5..26cb834c5e3b797ea7623a32d59889381ee7a6ad 100644 (file)
@@ -445,7 +445,13 @@ class applicationManagement 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);
index d1be42cd1af7f4c6c87a3843d36d9c723e2bd26a..975b2396e93b6734517ce94b01a8b091cc7db30f 100644 (file)
@@ -583,7 +583,13 @@ name='dep_root' alt='"._("Root")."'>&nbsp;".
      * 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);
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);
index 78eb404dba40dfd11aa8d6ca7a574f77903844c9..e77badd5531abb7be536650c30b4bdf3717fe15e 100644 (file)
@@ -991,7 +991,13 @@ class userManagement extends plugin
      */
 
     /* Create base to search in */
-    $base2 = preg_replace("/ou=people,/i","",$base);
+
+    $peopleOU = get_people_ou();
+    if(empty($peopleOU))  {
+      $base2 = $base;
+    }else{
+      $base2 = preg_replace("/".$peopleOU."/i","",$base);
+    }
 
     /* Get all departments within this subtree */
     $res3 =  get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
index f3a2e6c70e207a1c3e1e3dbe3c893f9066fab793..10f05354159ce9a0316d0b6103091b016d32f8ef 100644 (file)
@@ -448,7 +448,13 @@ class blocklist 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);
+    $peopleBase = get_people_ou();
+    if(empty($peopleBase)){
+      $base2 = $base;
+    }else{
+      $base2 = preg_replace("/".$peopleBase.",/i","",$base);
+    }
+   
     $res3 =  get_list2($this->ui->subtreeACL, "(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))",
         TRUE, $base2, array("ou", "description"), TRUE);
 
index d0fe77f6033967ef7eae3c3c918cebdf4e5c2d4d..78bf955287276074a021b1f00799d25a0d8f4e00 100755 (executable)
@@ -446,7 +446,13 @@ class gofonMacro 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);