Fix regressions in case-mapping with mbstring extension missing

This commit is contained in:
Brion Vibber 2006-09-20 20:05:32 +00:00
parent faa5ba7269
commit 81973d965c

View file

@ -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);