$this->addOption( 'multiversiononly', "Calculate only for files with several versions" );
$this->addOption( 'method', "Use 'pipe' to pipe to mysql command line,\n" .
"\t\tdefault uses Database class", false, true );
- $this->addOption( 'file', 'Fix for a specific file, without File: namespace prefixed', false, true );
+ $this->addOption(
+ 'file',
+ 'Fix for a specific file, without File: namespace prefixed',
+ false,
+ true
+ );
}
protected function getUpdateKey() {
);
if ( !$res ) {
$this->error( "No such file: $file", true );
+
return false;
}
$this->output( "Populating img_sha1 field for specified files\n" );
} else {
- if ( $force ) {
+ if ( $this->hasOption( 'multiversiononly' ) ) {
+ $conds = array();
+ $this->output( "Populating and recalculating img_sha1 field for versioned files\n" );
+ } elseif ( $force ) {
$conds = array();
$this->output( "Populating and recalculating img_sha1 field\n" );
} else {