From: Brion Vibber Date: Wed, 20 Sep 2006 20:05:32 +0000 (+0000) Subject: Fix regressions in case-mapping with mbstring extension missing X-Git-Tag: 1.31.0-rc.0~55763 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=81973d965c16e7f1c841b16605967217e3dc78c7;p=lhc%2Fweb%2Fwiklou.git Fix regressions in case-mapping with mbstring extension missing --- diff --git a/languages/Language.php b/languages/Language.php index bbd3bb08ee..6862d56b37 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -723,13 +723,13 @@ class Language { } function ucCallback($matches){ - global $wikiUpperChars; - return strtr( $matches[1] , $wikiUpperChars ); + list( $wikiUpperChars ) = self::getCaseMaps(); + return strtr( $matches[1], $wikiUpperChars ); } function lcCallback($matches){ - global $wikiLowerChars; - return strtr( $matches[1] , $wikiLowerChars ); + list( , $wikiLowerChars ) = self::getCaseMaps(); + return strtr( $matches[1], $wikiLowerChars ); } function ucwordsCallbackMB($matches){ @@ -737,8 +737,8 @@ class Language { } function ucwordsCallbackWiki($matches){ - global $wikiUpperChars; - return strtr( $matches[0] , $wikiUpperChars ); + list( $wikiUpperChars ) = self::getCaseMaps(); + return strtr( $matches[0], $wikiUpperChars ); } function ucfirst( $str ) { @@ -798,8 +798,6 @@ class Language { } function ucwords($str) { - global $wikiUpperChars; - if ( self::isMultibyte( $str ) ) { $str = self::lc($str); @@ -826,8 +824,6 @@ class Language { # capitalize words at word breaks function ucwordbreaks($str){ - global $wikiUpperChars; - if (self::isMultibyte( $str ) ) { $str = self::lc($str);