<?php
+use MediaWiki\MediaWikiServices;
+
/**
* Content handler for File: files
* TODO: this handler s not used directly now,
if ( NS_FILE != $title->getNamespace() ) {
return [];
}
- $file = wfLocalFile( $title );
+ $file = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
+ ->newFile( $title );
if ( !$file || !$file->exists() ) {
return [];
}