From: Reini U. <ru...@us...> - 2005-02-05 15:32:23
|
Update of /cvsroot/phpwiki/phpwiki/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24886 Modified Files: config.php Log Message: force guessing_setlocale (again) Index: config.php =================================================================== RCS file: /cvsroot/phpwiki/phpwiki/lib/config.php,v retrieving revision 1.130 retrieving revision 1.131 diff -u -2 -b -p -d -r1.130 -r1.131 --- config.php 29 Jan 2005 20:36:44 -0000 1.130 +++ config.php 5 Feb 2005 15:32:09 -0000 1.131 @@ -222,5 +222,5 @@ function guessing_setlocale ($category, if (!$locale) { // do the reverse: return the detected locale collapsed to our LANG - $locale = setlocale($category,''); + $locale = setlocale($category, ''); if ($locale) { if (strstr($locale, '_')) list ($lang) = split('_', $locale); @@ -266,5 +266,6 @@ function guessing_setlocale ($category, // [99ms] function update_locale($loc) { - if (!$loc) { + // $LANG or DEFAULT_LANGUAGE is too less information, at least on unix for + // setlocale(), for bindtextdomain() to succeed. $newlocale = guessing_setlocale(LC_ALL, $loc); // [56ms] if (!$newlocale) { @@ -274,8 +275,7 @@ function update_locale($loc) { $loc = guessing_setlocale(LC_ALL, $newlocale); } - } // Try to put new locale into environment (so any // programs we run will get the right locale.) - if (!function_exists ('bindtextdomain')) { + if (!function_exists('bindtextdomain')) { // Reinitialize translation array. global $locale; @@ -525,4 +525,7 @@ function getUploadDataPath() { // $Log$ +// Revision 1.131 2005/02/05 15:32:09 rurban +// force guessing_setlocale (again) +// // Revision 1.130 2005/01/29 20:36:44 rurban // very important php5 fix! clone objects |