Merge "Move subclasses of LogFormatter to their own file"
[lhc/web/wiklou.git] / maintenance / refreshImageMetadata.php
index ec61218..55f5b4a 100644 (file)
@@ -1,6 +1,6 @@
 <?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 {
 
        /**
@@ -48,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 );
 
        }
@@ -156,6 +161,10 @@ class RefreshImageMetadata extends Maintenance {
                }
        }
 
+       /**
+        * @param $dbw DatabaseBase
+        * @return array
+        */
        function getConditions( $dbw ) {
                $conds = array();
 
@@ -179,8 +188,12 @@ class RefreshImageMetadata extends Maintenance {
                return $conds;
        }
 
+       /**
+        * @param $force bool
+        * @param $brokenOnly bool
+        */
        function setupParameters( $force, $brokenOnly ) {
-               global $wgUpdateCompatibleMetadata, $wgReadOnly;
+               global $wgUpdateCompatibleMetadata;
 
                if ( $brokenOnly ) {
                        $wgUpdateCompatibleMetadata = false;