<?php
/**
- * Script to refresh image metadata fields. See also rebuildImages.php
+ * Refresh image metadata fields. See also rebuildImages.php
*
* Usage: php refreshImageMetadata.php
*
*
* @file
* @author Brian Wolff
- * @ingroup maintenance
+ * @ingroup Maintenance
*/
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
+/**
+ * Maintenance script to refresh image metadata fields.
+ *
+ * @ingroup Maintenance
+ */
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 );
}
}
}
+ /**
+ * @param $dbw DatabaseBase
+ * @return array
+ */
function getConditions( $dbw ) {
$conds = array();
return $conds;
}
+ /**
+ * @param $force bool
+ * @param $brokenOnly bool
+ */
function setupParameters( $force, $brokenOnly ) {
- global $wgUpdateCompatibleMetadata, $wgReadOnly;
+ global $wgUpdateCompatibleMetadata;
if ( $brokenOnly ) {
$wgUpdateCompatibleMetadata = false;