Code

Updated files to handle umlauts
[gosa.git] / plugins / admin / systems / class_glpiSelectUser.inc
index 42f3538303da80a33ef2c27c4125563f78b907d5..4d8e2d41adace1e64f0001e4a7f824e612066022 100644 (file)
@@ -156,12 +156,13 @@ class glpiSelectUser extends plugin
     }
 
     $listhead = "<div style='background:#F0F0F9;padding:5px;'>".
-      " <input class='center' type='image' align='middle' 
-      src='images/list_back.png' title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'>&nbsp;".
       " <input class='center' type='image' src='images/list_root.png' 
       align='middle' title='"._("Go to root department")."' name='dep_root' alt='"._("Root")."'>&nbsp;".
       " <input class='center' type='image' align='middle' 
+      src='images/list_back.png' title='"._("Go up one department")."' alt='"._("Up")."' name='dep_back'>&nbsp;".
+      " <input class='center' type='image' align='middle' 
       src='images/list_home.png' title='"._("Go to users department")."' alt='"._("Home")."' name='dep_home'>&nbsp;".
+      " <input class='center' type='image' src='images/list_reload.png' align='middle' title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'>&nbsp;".
 " <img class='center' src='images/list_seperator.png' align='middle' alt='' height='16' width='1'>&nbsp;"._("Base")."&nbsp;".
     " <select name='depselect' onChange='mainform.submit()' class='center'>$options</select>".
     " <input class='center' type='image' src='images/list_submit.png' align='middle'
@@ -207,8 +208,8 @@ class glpiSelectUser extends plugin
      * So we are able to navigate like in konquerer
      */
 
-    $res3 =  get_list2($this->ui->subtreeACL, "(&(|(ou=*)(description=*))(objectClass=gosaDepartment))",
-        TRUE, $base, array("ou", "description"), TRUE);
+    $res3= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))",
+                    $this->ui->subtreeACL, $base, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
 
     $this->departments= array();
     $tmp = array();
@@ -218,17 +219,18 @@ class glpiSelectUser extends plugin
     ksort($tmp);
     foreach($tmp as $value){
       if(isset($value["description"][0])){
-        $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]";
+        $this->departments[$value['dn']]= get_sub_department($value['dn'])." - [".$value["description"][0]."]";
       }else{
-        $this->departments[$value['dn']]=convert_department_dn2($value['dn']);//$value["description"][0];
+        $this->departments[$value['dn']]= get_sub_department($value['dn']);//$value["description"][0];
       }
     }
 
     /* END NEW LIST MANAGMENT
      */
     $ou = get_people_ou();
-    $res2 = get_list($this->ui->subtreeACL, "(&(|(cn=$regex)(sn=$regex))(objectClass=person))",
-        TRUE,$ou.$base, array("cn","sn","uid","givenName", "description"), TRUE);
+    $res2= get_list("(&(|(cn=$regex)(sn=$regex))(objectClass=person))", $this->ui->subtreeACL,
+                    $ou.$base, array("cn", "sn", "uid", "givenName", "description"),
+                    GL_SUBSEARCH | GL_SIZELIMIT);
 
     $tmp = array();