From 81973d965c16e7f1c841b16605967217e3dc78c7 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 20 Sep 2006 20:05:32 +0000 Subject: [PATCH] Fix regressions in case-mapping with mbstring extension missing --- languages/Language.php | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) 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); -- 2.20.1