tests: Make SpecialPageDataTest independend from the language
[lhc/web/wiklou.git] / includes / Linker.php
index e748b3a..324b1f5 100644 (file)
@@ -21,7 +21,7 @@
  */
 use MediaWiki\Linker\LinkTarget;
 use MediaWiki\MediaWikiServices;
-use MediaWiki\Storage\RevisionRecord;
+use MediaWiki\Revision\RevisionRecord;
 
 /**
  * Some internal bits split of from Skin.php. These functions are used
@@ -688,13 +688,14 @@ class Linker {
                if ( $label == '' ) {
                        $label = $title->getPrefixedText();
                }
+               $repoGroup = MediaWikiServices::getInstance()->getRepoGroup();
                $currentExists = $time
-                       && MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title ) !== false;
+                       && $repoGroup->findFile( $title ) !== false;
 
                if ( ( $wgUploadMissingFileUrl || $wgUploadNavigationUrl || $wgEnableUploads )
                        && !$currentExists
                ) {
-                       if ( RepoGroup::singleton()->getLocalRepo()->checkRedirect( $title ) ) {
+                       if ( $repoGroup->getLocalRepo()->checkRedirect( $title ) ) {
                                // We already know it's a redirect, so mark it accordingly
                                return self::link(
                                        $title,