* @file
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Image gallery
*
protected $mAttribs = [];
/** @var bool */
- static private $modeMapping = false;
+ private static $modeMapping = false;
/**
* Get a new image gallery. This is the method other callers
* @throws MWException
*/
static function factory( $mode = false, IContextSource $context = null ) {
- global $wgContLang;
self::loadModes();
if ( !$context ) {
$context = RequestContext::getMainAndWarn( __METHOD__ );
$mode = $galleryOptions['mode'];
}
- $mode = $wgContLang->lc( $mode );
+ $mode = MediaWikiServices::getInstance()->getContentLanguage()->lc( $mode );
if ( isset( self::$modeMapping[$mode] ) ) {
$class = self::$modeMapping[$mode];