Merge "RevisionStoreDbTestBase, remove redundant needsDB override"
[lhc/web/wiklou.git] / includes / filerepo / LocalRepo.php
index 03a9d44..c889e56 100644 (file)
@@ -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] )
@@ -507,7 +507,7 @@ class LocalRepo extends FileRepo {
        function getSharedCacheKey( /*...*/ ) {
                $args = func_get_args();
 
-               return call_user_func_array( 'wfMemcKey', $args );
+               return wfMemcKey( ...$args );
        }
 
        /**
@@ -590,7 +590,7 @@ class LocalRepo extends FileRepo {
                        wfDebug( __METHOD__ . ": skipped because storage uses sha1 paths\n" );
                        return Status::newGood();
                } else {
-                       return call_user_func_array( 'parent::' . $function, $args );
+                       return parent::$function( ...$args );
                }
        }
 }