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 "WatchedItemStore: Fix fatal when revision is deleted"
[lhc/web/wiklou.git]
/
maintenance
/
importImages.php
diff --git
a/maintenance/importImages.php
b/maintenance/importImages.php
index
dfa83cd
..
f5d9359
100644
(file)
--- a/
maintenance/importImages.php
+++ b/
maintenance/importImages.php
@@
-32,6
+32,8
@@
* @author Mij <mij@bitchx.it>
*/
* @author Mij <mij@bitchx.it>
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/Maintenance.php';
class ImportImages extends Maintenance {
require_once __DIR__ . '/Maintenance.php';
class ImportImages extends Maintenance {
@@
-127,7
+129,7
@@
class ImportImages extends Maintenance {
$processed = $added = $ignored = $skipped = $overwritten = $failed = 0;
$processed = $added = $ignored = $skipped = $overwritten = $failed = 0;
- $this->output( "Import
Imag
es\n\n" );
+ $this->output( "Import
ing Fil
es\n\n" );
$dir = $this->getArg( 0 );
$dir = $this->getArg( 0 );
@@
-219,7
+221,8
@@
class ImportImages extends Maintenance {
}
# Check existence
}
# Check existence
- $image = wfLocalFile( $title );
+ $image = MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()
+ ->newFile( $title );
if ( $image->exists() ) {
if ( $this->hasOption( 'overwrite' ) ) {
$this->output( "{$base} exists, overwriting..." );
if ( $image->exists() ) {
if ( $this->hasOption( 'overwrite' ) ) {
$this->output( "{$base} exists, overwriting..." );