X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FrefreshImageMetadata.php;h=831118ca7b87560a17334a6d79e51d13232821e3;hb=2b2aa59638eafaa914da50dba5cc489cc5d96b44;hp=95dc10bdf808940c3aa96dc904283aee79162793;hpb=89d8c583d7d6dd03f10382208a2cf5d43e2f7c3e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/refreshImageMetadata.php b/maintenance/refreshImageMetadata.php index 95dc10bdf8..831118ca7b 100644 --- a/maintenance/refreshImageMetadata.php +++ b/maintenance/refreshImageMetadata.php @@ -70,7 +70,7 @@ class RefreshImageMetadata extends Maintenance { $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 ); @@ -82,7 +82,6 @@ class RefreshImageMetadata extends Maintenance { false, true ); - } public function execute() { @@ -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 " . - "$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" ); } @@ -161,20 +160,17 @@ class RefreshImageMetadata extends Maintenance { 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" ); } - } - else { + } else { if ( $verbose ) { $this->output( "Skipping File:{$row->img_name}.\n" ); } } } - } $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() ); } + return $conds; }