mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/SpamBlacklist
synced 2024-11-23 22:54:57 +00:00
Avoid usage of deprecated $wgContLang global (dep in 1.32)
Change-Id: Ia87a464c22be764deacd699fb66f96a663ccfe7c
This commit is contained in:
parent
19c69f4158
commit
b9c0f0709b
|
@ -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 ) ) {
|
||||
|
|
Loading…
Reference in a new issue