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 "Fix HeaderCallback failing on headers without a colon"
[lhc/web/wiklou.git]
/
maintenance
/
refreshImageMetadata.php
diff --git
a/maintenance/refreshImageMetadata.php
b/maintenance/refreshImageMetadata.php
index
b7f03d9
..
65db94d
100644
(file)
--- a/
maintenance/refreshImageMetadata.php
+++ b/
maintenance/refreshImageMetadata.php
@@
-106,8
+106,9
@@
class RefreshImageMetadata extends Maintenance {
$error = 0;
$dbw = $this->getDB( DB_MASTER );
$error = 0;
$dbw = $this->getDB( DB_MASTER );
- if ( $this->mBatchSize <= 0 ) {
- $this->error( "Batch size is too low...", 12 );
+ $batchSize = $this->getBatchSize();
+ if ( $batchSize <= 0 ) {
+ $this->fatalError( "Batch size is too low...", 12 );
}
$repo = RepoGroup::singleton()->getLocalRepo();
}
$repo = RepoGroup::singleton()->getLocalRepo();
@@
-120,7
+121,7
@@
class RefreshImageMetadata extends Maintenance {
}
$options = [
}
$options = [
- 'LIMIT' => $
this->mB
atchSize,
+ 'LIMIT' => $
b
atchSize,
'ORDER BY' => 'img_name ASC',
];
'ORDER BY' => 'img_name ASC',
];
@@
-194,7
+195,7
@@
class RefreshImageMetadata extends Maintenance {
}
$conds2 = [ 'img_name > ' . $dbw->addQuotes( $row->img_name ) ];
wfWaitForSlaves();
}
$conds2 = [ 'img_name > ' . $dbw->addQuotes( $row->img_name ) ];
wfWaitForSlaves();
- } while ( $res->numRows() === $
this->mB
atchSize );
+ } while ( $res->numRows() === $
b
atchSize );
$total = $upgraded + $leftAlone;
if ( $force ) {
$total = $upgraded + $leftAlone;
if ( $force ) {
@@
-254,10
+255,10
@@
class RefreshImageMetadata extends Maintenance {
}
if ( $brokenOnly && $force ) {
}
if ( $brokenOnly && $force ) {
- $this->
e
rror( 'Cannot use --broken-only and --force together. ', 2 );
+ $this->
fatalE
rror( 'Cannot use --broken-only and --force together. ', 2 );
}
}
}
}
}
}
-$maintClass =
'RefreshImageMetadata'
;
+$maintClass =
RefreshImageMetadata::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;