dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update old URLs in DefaultSettings related to Squid caching
[lhc/web/wiklou.git]
/
maintenance
/
deleteBatch.php
diff --git
a/maintenance/deleteBatch.php
b/maintenance/deleteBatch.php
index
4f9e488
..
ee6e3e5
100644
(file)
--- a/
maintenance/deleteBatch.php
+++ b/
maintenance/deleteBatch.php
@@
-28,6
+28,8
@@
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
/**
require_once __DIR__ . '/Maintenance.php';
/**
@@
-98,7
+100,9
@@
class DeleteBatch extends Maintenance {
$this->output( $title->getPrefixedText() );
if ( $title->getNamespace() == NS_FILE ) {
$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... " );
}
if ( $img && $img->isLocal() && !$img->delete( $reason ) ) {
$this->output( " FAILED to delete associated file... " );
}