X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fusers%2Fclass_userManagement.inc;h=88936bd503a44fca137274790f3a877074bdd5c7;hb=c3a786a7af7dcec35d946e2e7f551ab29f05ad1c;hp=578b13008782cd6a68ee41da1c120da39c0808d3;hpb=b7bf8ddfb865632ec99171ee9972bf55d63b09a7;p=gosa.git diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 578b13008..88936bd50 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -350,7 +350,7 @@ class userManagement extends plugin /* Lock the current entry, so nobody will edit it during deletion */ add_lock ($this->dn, $this->ui->dn); - $smarty->assign("info", sprintf(_("You're about to delete the user %s."), $this->dn)); + $smarty->assign("info", sprintf(_("You're about to delete the user %s."), LDAP::fix($this->dn))); return($smarty->fetch(get_template_path('remove.tpl', TRUE))); } else { @@ -674,13 +674,13 @@ class userManagement extends plugin "  ". "  ". "  ". - _("Current base")." ". + _("Base")." ". "  ". ""; - $action= ""; - $action.= ""; - $action.= ""; + $action= ""; + $action.= ""; + $action.= ""; @@ -723,29 +723,29 @@ class userManagement extends plugin } /* Pictures for Extensions */ - $usrimg =""; - $posiximg = ""; - $eviroimg = ""; - $mailimg = ""; - $fonimg = ""; - $faximg = ""; - $sambaimg = ""; - $tplcreateuserimg = ""; - $empty = ""; + $empty = ""; // User and Template Images - $userimg = "User"; - $tplimg = "Template"; + $userimg = "User"; + $tplimg = "Template"; $editlink = "%s"; // Defines Arrays to save User and Templates @@ -989,23 +989,37 @@ class userManagement 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); + /* Create base to search in */ + + $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))", TRUE, $base2, array("ou", "description"), TRUE); $this->departments= array(); + /* Create array with results */ $tmp = array(); foreach ($res3 as $value){ $tmp[strtolower($value['dn']).$value['dn']]=$value; } + + /* Sort array */ ksort($tmp); + + /* Create result array */ foreach($tmp as $value){ - if(isset($value['description'][0]) && $value["description"][0]!=".."){ + if(isset($value['description'][0])){ $this->departments[$value['dn']]=convert_department_dn2($value['dn'])." - [".$value["description"][0]."]"; }else{ - $this->departments[$value['dn']]=$value["description"][0]; + $this->departments[$value['dn']]=convert_department_dn2($value['dn']); } } /* END NEW LIST MANAGMENT