Code

Fixed department sorting
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Apr 2006 13:13:16 +0000 (13:13 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 20 Apr 2006 13:13:16 +0000 (13:13 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3075 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/users/class_userManagement.inc

index c066fb61a6e910782790e10162d70141824dbf12..a23d11d2a9e2db392db2922d20309cee7f7a4ab3 100644 (file)
@@ -1103,28 +1103,15 @@ class userManagement extends plugin
     /* Get all departments within this subtree */
     $deps= get_list("(&(|(ou=$regex)(description=$regex))(objectClass=gosaDepartment))", $this->ui->subtreeACL,
                     $dep_base, array("ou", "description"), GL_SIZELIMIT | GL_CONVERT);
-                    
-    /* Append deparments to class var and if available add description */
-    $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){
+                 
+    $this->departments = array();
+    foreach($deps as $value){
       if(isset($value['description'][0])){
         $this->departments[$value['dn']]= get_sub_department($value['dn'])." - [".$value["description"][0]."]";
       }else{
         $this->departments[$value['dn']]= get_sub_department($value['dn']);
       }
     }
-
     natcasesort($this->departments);
   }