X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FMagicWordArray.php;h=fde32ce4fd6a6b90833d7de93c5fada98a03df55;hb=9d00d8783e9d74343fc0ea34ab228ce70684e4e4;hp=20ac680a98dece0b586c0c87a309fdc5173a548b;hpb=8519fdd110e10180517560e2bc5ce36090fd181c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/MagicWordArray.php b/includes/MagicWordArray.php index 20ac680a98..fde32ce4fd 100644 --- a/includes/MagicWordArray.php +++ b/includes/MagicWordArray.php @@ -81,14 +81,13 @@ class MagicWordArray { */ public function getHash() { if ( is_null( $this->hash ) ) { - global $wgContLang; $this->hash = [ 0 => [], 1 => [] ]; foreach ( $this->names as $name ) { $magic = $this->factory->get( $name ); $case = intval( $magic->isCaseSensitive() ); foreach ( $magic->getSynonyms() as $syn ) { if ( !$case ) { - $syn = $wgContLang->lc( $syn ); + $syn = $this->factory->getContentLanguage()->lc( $syn ); } $this->hash[$case][$syn] = $name; } @@ -268,8 +267,7 @@ class MagicWordArray { if ( isset( $hash[1][$text] ) ) { return $hash[1][$text]; } - global $wgContLang; - $lc = $wgContLang->lc( $text ); + $lc = $this->factory->getContentLanguage()->lc( $text ); if ( isset( $hash[0][$lc] ) ) { return $hash[0][$lc]; }