X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=blobdiff_plain;f=maintenance%2FeraseArchivedFile.php;h=49fadaa2d80233338267d45ae90e98b744b71da9;hb=ac619fc4a60f4d7538b0fda496f25d2eb7f0c220;hp=ef6d3d8b895798b99465c824d600b4e15d32059f;hpb=577f3d79115173f4dd16bb46f6d0ef2c82b55add;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/eraseArchivedFile.php b/maintenance/eraseArchivedFile.php index ef6d3d8b89..49fadaa2d8 100644 --- a/maintenance/eraseArchivedFile.php +++ b/maintenance/eraseArchivedFile.php @@ -21,6 +21,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + require_once __DIR__ . '/Maintenance.php'; /** @@ -66,7 +68,7 @@ class EraseArchivedFile extends Maintenance { $afile = ArchivedFile::newFromRow( $row ); } - $file = wfLocalFile( $filename ); + $file = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()->newFile( $filename ); if ( $file->exists() ) { $this->fatalError( "File '$filename' is still a public file, use the delete form.\n" ); }