make locale just one of the args
authorChuck Hagenbuch <chuck@horde.org>
Tue, 16 Dec 2008 05:02:33 +0000 (00:02 -0500)
committerChuck Hagenbuch <chuck@horde.org>
Tue, 16 Dec 2008 05:02:33 +0000 (00:02 -0500)
framework/Horde_Date_Parser/lib/Horde/Support/Numerizer.php

index 4598f62..062f704 100644 (file)
@@ -4,9 +4,10 @@
  */
 class Horde_Support_Numerizer
 {
-    public static function factory($locale = null, $args = array())
+    public static function factory($args = array())
     {
-        if ($locale) {
+        $locale = isset($args['locale']) ? $args['locale'] : null;
+        if ($locale && strtolower($locale) != 'base') {
             $locale = str_replace(' ', '_', ucwords(str_replace('_', ' ', strtolower($locale))));
             $class = 'Horde_Support_Numerizer_Locale_' . $locale;
             if (class_exists($class)) {