X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeleteBatch.php;h=ee6e3e5306a0f670d5862e35b97d3e533d3c0e59;hb=7af7bbe7476996bf60d8d8e48a84687ccd7505df;hp=4f9e488343daefd43912d554f0f7dce13f15e157;hpb=9fc202b69496353a1142a692be5aaf158e9ea30c;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/deleteBatch.php b/maintenance/deleteBatch.php index 4f9e488343..ee6e3e5306 100644 --- a/maintenance/deleteBatch.php +++ b/maintenance/deleteBatch.php @@ -28,6 +28,8 @@ * @ingroup Maintenance */ +use MediaWiki\MediaWikiServices; + require_once __DIR__ . '/Maintenance.php'; /** @@ -98,7 +100,9 @@ class DeleteBatch extends Maintenance { $this->output( $title->getPrefixedText() ); if ( $title->getNamespace() == NS_FILE ) { - $img = wfFindFile( $title, [ 'ignoreRedirect' => true ] ); + $img = MediaWikiServices::getInstance()->getRepoGroup()->findFile( + $title, [ 'ignoreRedirect' => true ] + ); if ( $img && $img->isLocal() && !$img->delete( $reason ) ) { $this->output( " FAILED to delete associated file... " ); }