X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FdeleteBatch.php;h=ee6e3e5306a0f670d5862e35b97d3e533d3c0e59;hb=72e141a5e33417a3f4bcb18cf8a862634bda9bee;hp=4f9e488343daefd43912d554f0f7dce13f15e157;hpb=58d70885d875a3928d96a2ca0a74dbc0ec5bb8bb;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... " ); }