X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrefreshImageMetadata.php;h=7fe5c4c17723d718c396b44432ea9ead0885d54b;hb=3a06dd9be90166d0c85abe2750199d6162f6f5ff;hp=12da7a8bc17ff5b9a70fff24d25641c5ebba21a2;hpb=a7722e6131520142ee40e36e2f937292d0f90544;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/refreshImageMetadata.php b/maintenance/refreshImageMetadata.php index 12da7a8bc1..7fe5c4c177 100644 --- a/maintenance/refreshImageMetadata.php +++ b/maintenance/refreshImageMetadata.php @@ -27,7 +27,7 @@ * @ingroup Maintenance */ -require_once( __DIR__ . '/Maintenance.php' ); +require_once __DIR__ . '/Maintenance.php'; /** * Maintenance script to refresh image metadata fields. @@ -53,7 +53,7 @@ class RefreshImageMetadata extends Maintenance { $this->addOption( 'start', 'Name of file to start with', false, true ); $this->addOption( 'end', 'Name of file to end with', false, true ); - $this->addOption( 'mime', '(Inefficient!) Only refresh files with this mime type. Can accept wild-card image/*' , false, true ); + $this->addOption( 'mime', '(Inefficient!) Only refresh files with this mime type. Can accept wild-card image/*', false, true ); $this->addOption( 'metadata-contains', '(Inefficient!) Only refresh files where the img_metadata field contains this string. Can be used if its known a specific property was being extracted incorrectly.', false, true ); } @@ -99,7 +99,7 @@ class RefreshImageMetadata extends Maintenance { if ( $res->numRows() > 0 ) { $row1 = $res->current(); - $this->output( "Processing next {$this->mBatchSize} rows starting with {$row1->img_name}.\n"); + $this->output( "Processing next {$this->mBatchSize} rows starting with {$row1->img_name}.\n" ); $res->rewind(); } else { $this->error( "No images to process.", 4 ); @@ -123,7 +123,7 @@ class RefreshImageMetadata extends Maintenance { $this->output( "Warning: File:{$row->img_name} used to have " . "$oldLength bytes of metadata but now has $newLength bytes.\n" ); } elseif ( $verbose ) { - $this->output("Refreshed File:{$row->img_name}.\n" ); + $this->output( "Refreshed File:{$row->img_name}.\n" ); } } else { $leftAlone++; @@ -138,7 +138,7 @@ class RefreshImageMetadata extends Maintenance { } if ( $verbose ) { - $this->output("Forcibly refreshed File:{$row->img_name}.\n" ); + $this->output( "Forcibly refreshed File:{$row->img_name}.\n" ); } } else { @@ -151,7 +151,7 @@ class RefreshImageMetadata extends Maintenance { } $conds2 = array( 'img_name > ' . $dbw->addQuotes( $row->img_name ) ); wfWaitForSlaves(); - } while( $res->numRows() === $this->mBatchSize ); + } while ( $res->numRows() === $this->mBatchSize ); $total = $upgraded + $leftAlone; if ( $force ) { @@ -173,7 +173,7 @@ class RefreshImageMetadata extends Maintenance { $like = $this->getOption( 'metadata-contains', false ); if ( $end !== false ) { - $conds[] = 'img_name <= ' . $dbw->addQuotes( $end ) ; + $conds[] = 'img_name <= ' . $dbw->addQuotes( $end ); } if ( $mime !== false ) { list( $major, $minor ) = File::splitMime( $mime ); @@ -209,4 +209,4 @@ class RefreshImageMetadata extends Maintenance { $maintClass = 'RefreshImageMetadata'; -require_once( RUN_MAINTENANCE_IF_MAIN ); +require_once RUN_MAINTENANCE_IF_MAIN;