X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2Ffilerepo%2FLocalRepo.php;h=c889e567235f32c165e29868594d755bbfe80b1c;hb=65a7696952de8cf9f2ef0cca1e79b12f23813b06;hp=9a6ef22f17856ad9b1616ee7d753a112aad17558;hpb=925c20a9ca669c67cc44f4468d0e0f3b33b94213;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php index 9a6ef22f17..c889e56723 100644 --- a/includes/filerepo/LocalRepo.php +++ b/includes/filerepo/LocalRepo.php @@ -278,7 +278,7 @@ class LocalRepo extends FileRepo { $applyMatchingFiles = function ( ResultWrapper $res, &$searchSet, &$finalFiles ) use ( $fileMatchesSearch, $flags ) { - global $wgContLang; + $contLang = MediaWikiServices::getInstance()->getContentLanguage(); $info = $this->getInfo(); foreach ( $res as $row ) { $file = $this->newFileFromRow( $row ); @@ -287,7 +287,7 @@ class LocalRepo extends FileRepo { $dbKeysLook = [ strtr( $file->getName(), ' ', '_' ) ]; if ( !empty( $info['initialCapital'] ) ) { // Search keys for "hi.png" and "Hi.png" should use the "Hi.png file" - $dbKeysLook[] = $wgContLang->lcfirst( $file->getName() ); + $dbKeysLook[] = $contLang->lcfirst( $file->getName() ); } foreach ( $dbKeysLook as $dbKey ) { if ( isset( $searchSet[$dbKey] )