logo       
Google Custom Search
    AddThis Social Bookmark Button

CVS: phpwiki/lib config.php,1.132,1.133: msg#00080

Subject: CVS: phpwiki/lib config.php,1.132,1.133
Update of /cvsroot/phpwiki/phpwiki/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8121

Modified Files:
        config.php 
Log Message:
 improve the locale splitter

Index: config.php
===================================================================
RCS file: /cvsroot/phpwiki/phpwiki/lib/config.php,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -2 -b -p -d -r1.132 -r1.133
--- config.php  7 Feb 2005 15:39:02 -0000       1.132
+++ config.php  8 Feb 2005 13:26:59 -0000       1.133
@@ -250,10 +250,12 @@ function guessing_setlocale ($category, 
         if ($res = setlocale($category, $try))
             return $res;
-        foreach (array('@', ".", '_') as $sep) {
-            list ($try) = split($sep, $try);
-            if ($res = setlocale($category, $try))
+        foreach (array(".", '@', '_') as $sep) {
+            if ($i = strpos($try, $sep)) {
+                $try = substr($try, 0, $i);
+                if (($res = setlocale($category, $try)))
                 return $res;
         }
     }
+    }
     return false;
     // A standard locale name is typically of  the  form
@@ -527,4 +529,7 @@ function getUploadDataPath() {
 
 // $Log$
+// Revision 1.133  2005/02/08 13:26:59  rurban
+//  improve the locale splitter
+//
 // Revision 1.132  2005/02/07 15:39:02  rurban
 // another locale fix



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click



Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>