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 "Import: Handle uploads with sha1 starting with 0 properly"
[lhc/web/wiklou.git]
/
maintenance
/
refreshImageMetadata.php
diff --git
a/maintenance/refreshImageMetadata.php
b/maintenance/refreshImageMetadata.php
index
95dc10b
..
4f2341c
100644
(file)
--- a/
maintenance/refreshImageMetadata.php
+++ b/
maintenance/refreshImageMetadata.php
@@
-70,7
+70,7
@@
class RefreshImageMetadata extends Maintenance {
$this->addOption(
'mime',
$this->addOption(
'mime',
- '(Inefficient!) Only refresh files with this
mime
type. Can accept wild-card image/*',
+ '(Inefficient!) Only refresh files with this
MIME
type. Can accept wild-card image/*',
false,
true
);
false,
true
);
@@
-82,7
+82,6
@@
class RefreshImageMetadata extends Maintenance {
false,
true
);
false,
true
);
-
}
public function execute() {
}
public function execute() {
@@
-96,7
+95,7
@@
class RefreshImageMetadata extends Maintenance {
$leftAlone = 0;
$error = 0;
$leftAlone = 0;
$error = 0;
- $dbw =
wfG
etDB( DB_MASTER );
+ $dbw =
$this->g
etDB( DB_MASTER );
if ( $this->mBatchSize <= 0 ) {
$this->error( "Batch size is too low...", 12 );
}
if ( $this->mBatchSize <= 0 ) {
$this->error( "Batch size is too low...", 12 );
}
@@
-148,7
+147,7
@@
class RefreshImageMetadata extends Maintenance {
// to weed out any inconsequential changes.
$error++;
$this->output( "Warning: File:{$row->img_name} used to have " .
// to weed out any inconsequential changes.
$error++;
$this->output( "Warning: File:{$row->img_name} used to have " .
- "$oldLength bytes of metadata but now has $newLength bytes.\n" );
+
"$oldLength bytes of metadata but now has $newLength bytes.\n" );
} elseif ( $verbose ) {
$this->output( "Refreshed File:{$row->img_name}.\n" );
}
} elseif ( $verbose ) {
$this->output( "Refreshed File:{$row->img_name}.\n" );
}
@@
-161,20
+160,17
@@
class RefreshImageMetadata extends Maintenance {
if ( $newLength < $oldLength - 5 ) {
$error++;
$this->output( "Warning: File:{$row->img_name} used to have " .
if ( $newLength < $oldLength - 5 ) {
$error++;
$this->output( "Warning: File:{$row->img_name} used to have " .
- "$oldLength bytes of metadata but now has $newLength bytes. (forced)\n" );
-
+ "$oldLength bytes of metadata but now has $newLength bytes. (forced)\n" );
}
if ( $verbose ) {
$this->output( "Forcibly refreshed File:{$row->img_name}.\n" );
}
}
if ( $verbose ) {
$this->output( "Forcibly refreshed File:{$row->img_name}.\n" );
}
- }
- else {
+ } else {
if ( $verbose ) {
$this->output( "Skipping File:{$row->img_name}.\n" );
}
}
}
if ( $verbose ) {
$this->output( "Skipping File:{$row->img_name}.\n" );
}
}
}
-
}
$conds2 = array( 'img_name > ' . $dbw->addQuotes( $row->img_name ) );
wfWaitForSlaves();
}
$conds2 = array( 'img_name > ' . $dbw->addQuotes( $row->img_name ) );
wfWaitForSlaves();
@@
-216,6
+212,7
@@
class RefreshImageMetadata extends Maintenance {
if ( $like ) {
$conds[] = 'img_metadata ' . $dbw->buildLike( $dbw->anyString(), $like, $dbw->anyString() );
}
if ( $like ) {
$conds[] = 'img_metadata ' . $dbw->buildLike( $dbw->anyString(), $like, $dbw->anyString() );
}
+
return $conds;
}
return $conds;
}