Fix regressions in case-mapping with mbstring extension missing
This commit is contained in:
parent
faa5ba7269
commit
81973d965c
1 changed files with 6 additions and 10 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue