mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2024-11-15 03:33:55 +00:00
Avoid usage of deprecated $wgContLang global (dep in 1.32)
Change-Id: I3c5413392871d11cf363db6f88ee80ac030daabb
This commit is contained in:
parent
04e919b20b
commit
d60de7d63a
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
class SpecialCiteThisPage extends FormSpecialPage {
|
||||
|
||||
/**
|
||||
|
@ -145,9 +147,10 @@ class SpecialCiteThisPage extends FormSpecialPage {
|
|||
# and the text moved into SpecialCite.i18n.php
|
||||
# This code is kept for b/c in case an installation has its own file "citethispage-content-xx"
|
||||
# for a previously not supported language.
|
||||
global $wgContLang, $wgContLanguageCode;
|
||||
global $wgContLanguageCode;
|
||||
$dir = __DIR__ . '/../';
|
||||
$code = $wgContLang->lc( $wgContLanguageCode );
|
||||
$code = MediaWikiServices::getInstance()->getContentLanguage()
|
||||
->lc( $wgContLanguageCode );
|
||||
if ( file_exists( "${dir}citethispage-content-$code" ) ) {
|
||||
$msg = file_get_contents( "${dir}citethispage-content-$code" );
|
||||
} elseif ( file_exists( "${dir}citethispage-content" ) ) {
|
||||
|
|
Loading…
Reference in a new issue