Code

Maybe it's a good idea to maintain the index if we're using it later on ;-)
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Aug 2009 15:53:30 +0000 (15:53 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 17 Aug 2009 15:53:30 +0000 (15:53 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14081 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_departmentSortIterator.inc
gosa-core/include/class_listingSortIterator.inc

index 2a2863227c97a7475d6ba927db92d19fa067c02f..399085d5310411b4b09fdebb13045488fec1379a 100644 (file)
@@ -50,11 +50,11 @@ class departmentSortIterator implements Iterator {
     }
 
     // Sort for attribute
-    usort($data, "depSort");
+    uasort($data, "depSort");
 
     // Invert if direction is set
     if ($direction) {
-      $this->data= array_reverse($data);
+      $this->data= array_reverse($data, true);
     } else {
       $this->data= $data;
     }
index e656d98a9c1fcbee351d95eeb49abe8f1576ad69..7f46512e51c9ed003f086500b5f30eb1062e5915 100644 (file)
@@ -62,12 +62,12 @@ class listingSortIterator implements Iterator {
 
     // Sort for attribute
     if ($attribute != "") {
-      usort($data, "attrSort");
+      uasort($data, "attrSort");
     }
 
     // Invert if direction is set
     if ($direction) {
-      $this->data= array_reverse($data);
+      $this->data= array_reverse($data, true);
     } else {
       $this->data= $data;
     }