Code

Fixed sorting for user management
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 May 2006 11:32:05 +0000 (11:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 29 May 2006 11:32:05 +0000 (11:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@3546 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/users/class_userManagement.inc

index 7d2fd5cda6cd0ad5aa561c4c2d9f4ce0d2251b3f..c03c089377109af6b4ecd6b18980996bec495736 100644 (file)
@@ -702,6 +702,7 @@ class userManagement extends plugin
                             array("uid", "givenName", "sn", "objectClass"), GL_SIZELIMIT);
     }
     $SortTemp = array();
+    $List = array();
     foreach($ListTemp as $Key => $Entry){
        // Generate caption for rows
       if (isset($Entry["sn"]) && isset($Entry["givenName"])){
@@ -710,12 +711,16 @@ class userManagement extends plugin
         $display= "[".$Entry["uid"][0]."]";
       }
 
-      $SortTemp[$Key] = $display;
+      $display = strtolower($display);
+      $List[$display] = $Entry;
+      $SortTemp[$display] = $display;
     }
-    natcasesort($SortTemp);
+    sort($SortTemp);
     reset($SortTemp);
-    foreach($SortTemp as $Key => $Value){
-      $this->list[] = $ListTemp[$Key];
+
+    $this->list = array();
+    foreach($SortTemp as $Key){
+      $this->list[] = $List[$Key];
     }
   }