Make readonly work for OOUI forms
[lhc/web/wiklou.git] / maintenance / populateImageSha1.php
index 575573b..e9123aa 100644 (file)
@@ -77,11 +77,15 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance {
                        );
                        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 {