Merge "Allow partially blocked users to tag unrelated revisions"
[lhc/web/wiklou.git] / includes / Linker.php
index e748b3a..1a5058d 100644 (file)
@@ -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,