From: Chuck Hagenbuch Date: Mon, 4 May 2009 03:07:56 +0000 (-0400) Subject: fix rules that rely on proper sorting of repeaters from widest to smallest X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f4273f4f4bc601f30bd49a3c5a4cd7e3d5980838;p=horde.git fix rules that rely on proper sorting of repeaters from widest to smallest --- diff --git a/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php b/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php index ee7aa49aa..a9029b86d 100644 --- a/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php +++ b/framework/Date_Parser/lib/Horde/Date/Parser/Locale/Base.php @@ -551,7 +551,8 @@ class Horde_Date_Parser_Locale_Base } } - rsort($repeaters); + // Return repeaters in order from widest (years) to smallest (seconds) + usort($repeaters, create_function('$a, $b', 'return $b->width() > $a->width();')); return $repeaters; }