X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fgallery%2FImageGalleryBase.php;h=6e8c8c9ab763f1ce3fbd5afc6bcb7126e7396f0d;hb=1504dea1127a5f7960dcdc4eed5a044f6a962deb;hp=09e40a2821a05e78c815d13ef9ab18efeeec814f;hpb=248dae37e7d8da1f7748395d0b0b9973e520d95b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/gallery/ImageGalleryBase.php b/includes/gallery/ImageGalleryBase.php index 09e40a2821..6e8c8c9ab7 100644 --- a/includes/gallery/ImageGalleryBase.php +++ b/includes/gallery/ImageGalleryBase.php @@ -20,6 +20,8 @@ * @file */ +use MediaWiki\MediaWikiServices; + /** * Image gallery * @@ -99,7 +101,6 @@ abstract class ImageGalleryBase extends ContextSource { * @throws MWException */ static function factory( $mode = false, IContextSource $context = null ) { - global $wgContLang; self::loadModes(); if ( !$context ) { $context = RequestContext::getMainAndWarn( __METHOD__ ); @@ -109,7 +110,7 @@ abstract class ImageGalleryBase extends ContextSource { $mode = $galleryOptions['mode']; } - $mode = $wgContLang->lc( $mode ); + $mode = MediaWikiServices::getInstance()->getContentLanguage()->lc( $mode ); if ( isset( self::$modeMapping[$mode] ) ) { $class = self::$modeMapping[$mode];