From: cajus Date: Fri, 28 Aug 2009 09:13:46 +0000 (+0000) Subject: Fix sorting for dates X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=daabeb2cb4f1587c2da35ad6de96b022e8738e54;p=gosa.git Fix sorting for dates git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14154 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_listingSortIterator.inc b/gosa-core/include/class_listingSortIterator.inc index 14aef7630..af18544aa 100644 --- a/gosa-core/include/class_listingSortIterator.inc +++ b/gosa-core/include/class_listingSortIterator.inc @@ -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);