<?php
+
+use MediaWiki\MediaWikiServices;
+
/**
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
}
}
- $file = wfFindFile( $title, [ 'latest' => true ] );
+ $file = MediaWikiServices::getInstance()->getRepoGroup()->findFile(
+ $title, [ 'latest' => true ]
+ );
if ( !$file ) {
$r['result'] = 'Failure';
$r['errors'] = $this->getErrorFormatter()->arrayFromStatus(