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
Merge "Call resetServices() when setting globals in tests"
[lhc/web/wiklou.git]
/
maintenance
/
eraseArchivedFile.php
diff --git
a/maintenance/eraseArchivedFile.php
b/maintenance/eraseArchivedFile.php
index
24ef1ed
..
49fadaa
100644
(file)
--- a/
maintenance/eraseArchivedFile.php
+++ b/
maintenance/eraseArchivedFile.php
@@
-21,6
+21,8
@@
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
/**
require_once __DIR__ . '/Maintenance.php';
/**
@@
-66,7
+68,7
@@
class EraseArchivedFile extends Maintenance {
$afile = ArchivedFile::newFromRow( $row );
}
$afile = ArchivedFile::newFromRow( $row );
}
- $file =
wfLocal
File( $filename );
+ $file =
MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()->new
File( $filename );
if ( $file->exists() ) {
$this->fatalError( "File '$filename' is still a public file, use the delete form.\n" );
}
if ( $file->exists() ) {
$this->fatalError( "File '$filename' is still a public file, use the delete form.\n" );
}
@@
-115,5
+117,5
@@
class EraseArchivedFile extends Maintenance {
}
}
}
}
-$maintClass =
"EraseArchivedFile"
;
+$maintClass =
EraseArchivedFile::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;