Code

Fix sorting for dates
[gosa.git] / gosa-core / include / class_listingSortIterator.inc
index 14aef7630feb6b312578acae870cb0e2b0753222..af18544aa898fe213b04fee7442e292b6c1fdaaa 100644 (file)
@@ -58,6 +58,12 @@ class listingSortIterator implements Iterator {
           return $b - $a;
 
         case 'date':
+          if ($a == "") {
+            $a= "31.12.0000";
+          }
+          if ($b == "") {
+            $b= "31.12.0000";
+          }
           list($d, $m, $y)= split('\.', $a);
           $a= (int)sprintf("%04d%02d%02d", $y, $m, $d);
           list($d, $m, $y)= split('\.', $b);