* @ingroup SpecialPage
*/
+use MediaWiki\MediaWikiServices;
+
/**
* A special page that redirects to: the user for a numeric user id,
* the file for a given filename, or the page for a given revision id.
} catch ( MalformedTitleException $e ) {
return Status::newFatal( $e->getMessageObject() );
}
- $file = wfFindFile( $title );
+ $file = MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title );
if ( !$file || !$file->exists() ) {
// Message: redirect-not-exists