dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "maintenance: Move backup.inc to a regular php class file"
[lhc/web/wiklou.git]
/
includes
/
gallery
/
ImageGalleryBase.php
diff --git
a/includes/gallery/ImageGalleryBase.php
b/includes/gallery/ImageGalleryBase.php
index
09e40a2
..
6e8c8c9
100644
(file)
--- a/
includes/gallery/ImageGalleryBase.php
+++ b/
includes/gallery/ImageGalleryBase.php
@@
-20,6
+20,8
@@
* @file
*/
* @file
*/
+use MediaWiki\MediaWikiServices;
+
/**
* Image gallery
*
/**
* Image gallery
*
@@
-99,7
+101,6
@@
abstract class ImageGalleryBase extends ContextSource {
* @throws MWException
*/
static function factory( $mode = false, IContextSource $context = null ) {
* @throws MWException
*/
static function factory( $mode = false, IContextSource $context = null ) {
- global $wgContLang;
self::loadModes();
if ( !$context ) {
$context = RequestContext::getMainAndWarn( __METHOD__ );
self::loadModes();
if ( !$context ) {
$context = RequestContext::getMainAndWarn( __METHOD__ );
@@
-109,7
+110,7
@@
abstract class ImageGalleryBase extends ContextSource {
$mode = $galleryOptions['mode'];
}
$mode = $galleryOptions['mode'];
}
- $mode =
$wgContLang
->lc( $mode );
+ $mode =
MediaWikiServices::getInstance()->getContentLanguage()
->lc( $mode );
if ( isset( self::$modeMapping[$mode] ) ) {
$class = self::$modeMapping[$mode];
if ( isset( self::$modeMapping[$mode] ) ) {
$class = self::$modeMapping[$mode];