Merge "tests: Replace PHPUnit's loose assertEquals(null) with assertNull()"
[lhc/web/wiklou.git] / includes / api / ApiMove.php
index 4cbed21..74c6f8f 100644 (file)
@@ -59,9 +59,10 @@ class ApiMove extends ApiBase {
                }
                $toTalk = $toTitle->getTalkPageIfDefined();
 
+               $repoGroup = MediaWikiServices::getInstance()->getRepoGroup();
                if ( $toTitle->getNamespace() == NS_FILE
-                       && !RepoGroup::singleton()->getLocalRepo()->findFile( $toTitle )
-                       && MediaWikiServices::getInstance()->getRepoGroup()->findFile( $toTitle )
+                       && !$repoGroup->getLocalRepo()->findFile( $toTitle )
+                       && $repoGroup->findFile( $toTitle )
                ) {
                        if ( !$params['ignorewarnings'] &&
                                 $this->getPermissionManager()->userHasRight( $user, 'reupload-shared' ) ) {