X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/mediawiki.git/blobdiff_plain/51ff73d1c23dde7d9149040d018c42ae27b20a0c..e8266de79c5e2d6e52987cf19dc5ac90d09f4b82:/maintenance/rebuildImages.php diff --git a/maintenance/rebuildImages.php b/maintenance/rebuildImages.php index 46b5d0ed..0d3bdb3f 100644 --- a/maintenance/rebuildImages.php +++ b/maintenance/rebuildImages.php @@ -32,7 +32,7 @@ $options = array( 'missing', 'dry-run' ); -require_once( 'commandLine.inc' ); +require_once( dirname(__FILE__) . '/commandLine.inc' ); require_once( 'FiveUpgrade.inc' ); class ImageBuilder extends FiveUpgrade { @@ -104,7 +104,7 @@ class ImageBuilder extends FiveUpgrade { $result = $this->dbr->query( $sql, $fname ); while( $row = $this->dbr->fetchObject( $result ) ) { - $update = call_user_func( $callback, $row ); + $update = call_user_func( $callback, $row, null ); if( $update ) { $this->progress( 1 ); } else { @@ -120,7 +120,7 @@ class ImageBuilder extends FiveUpgrade { $this->buildTable( 'image', 'img_name', $callback ); } - function imageCallback( $row ) { + function imageCallback( $row, $copy ) { // Create a File object from the row // This will also upgrade it $file = $this->getRepo()->newFileFromRow( $row ); @@ -132,7 +132,7 @@ class ImageBuilder extends FiveUpgrade { array( &$this, 'oldimageCallback' ) ); } - function oldimageCallback( $row ) { + function oldimageCallback( $row, $copy ) { // Create a File object from the row // This will also upgrade it if ( $row->oi_archive_name == '' ) {