From 372de329557343def473c9802bac4f99cc60c339 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 20 Apr 2006 11:45:22 +0000 Subject: [PATCH] Fixed userManagement sorting git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3071 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/users/class_userManagement.inc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 3c508c13a..c066fb61a 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -1105,7 +1105,19 @@ class userManagement extends plugin $dep_base, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT); /* Append deparments to class var and if available add description */ - foreach($deps as $value){ + $tmp= array(); + foreach ($deps as $value){ + $tmp[strtolower($value['dn']).$value['dn']]= $value; + } + + /* Sort array */ + //FIXME: Which is implied by ksort, I guess. + ksort($tmp); + + /* Create result array */ + //FIXME: Didn't we do that above? + $this->departments= array(); + foreach($tmp as $value){ if(isset($value['description'][0])){ $this->departments[$value['dn']]= get_sub_department($value['dn'])." - [".$value["description"][0]."]"; }else{ -- 2.30.2