From b9c0f0709b9ce229ddceaafdb9b4efbc7d092f96 Mon Sep 17 00:00:00 2001 From: Derick Alangi Date: Mon, 2 Sep 2019 09:49:09 +0100 Subject: [PATCH] Avoid usage of deprecated $wgContLang global (dep in 1.32) Change-Id: Ia87a464c22be764deacd699fb66f96a663ccfe7c --- includes/BaseBlacklist.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/BaseBlacklist.php b/includes/BaseBlacklist.php index 7746d3b9..17b31c3e 100644 --- a/includes/BaseBlacklist.php +++ b/includes/BaseBlacklist.php @@ -202,9 +202,9 @@ abstract class BaseBlacklist { * @return bool|string */ public static function getTypeFromTitle( Title $title ) { - global $wgContLang; + $contLang = MediaWikiServices::getInstance()->getContentLanguage(); - $types = array_map( [ $wgContLang, 'ucfirst' ], array_keys( self::$blacklistTypes ) ); + $types = array_map( [ $contLang, 'ucfirst' ], array_keys( self::$blacklistTypes ) ); $regex = '/(' . implode( '|', $types ) . ')-(?:blacklist|whitelist)/'; if ( preg_match( $regex, $title->getDBkey(), $m ) ) {