* @file
*/
+use MediaWiki\MediaWikiServices;
+
/**
* API Module to move pages
* @ingroup API
if ( $toTitle->getNamespace() == NS_FILE
&& !RepoGroup::singleton()->getLocalRepo()->findFile( $toTitle )
- && wfFindFile( $toTitle )
+ && MediaWikiServices::getInstance()->getRepoGroup()->findFile( $toTitle )
) {
if ( !$params['ignorewarnings'] && $user->isAllowed( 'reupload-shared' ) ) {
$this->dieWithError( 'apierror-fileexists-sharedrepo-perm' );