X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FrebuildImages.php;h=1b0a27df66152a267023986174be2090ea451d9e;hb=ce0db4678ca01fbc05b87cd04c2302e88c48b1c4;hp=8e3997878ae63c0acf7f30d16f186cc478248c6d;hpb=35073a9d890214f841124efff88efaf37ed3fff2;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/rebuildImages.php b/maintenance/rebuildImages.php index 8e3997878a..1b0a27df66 100644 --- a/maintenance/rebuildImages.php +++ b/maintenance/rebuildImages.php @@ -48,7 +48,7 @@ class ImageBuilder extends Maintenance { parent::__construct(); global $wgUpdateCompatibleMetadata; - //make sure to update old, but compatible img_metadata fields. + // make sure to update old, but compatible img_metadata fields. $wgUpdateCompatibleMetadata = true; $this->mDescription = 'Script to update image metadata records'; @@ -58,7 +58,7 @@ class ImageBuilder extends Maintenance { } public function execute() { - $this->dbw = wfGetDB( DB_MASTER ); + $this->dbw = $this->getDB( DB_MASTER ); $this->dryrun = $this->hasOption( 'dry-run' ); if ( $this->dryrun ) { $GLOBALS['wgReadOnly'] = 'Dry run mode, image upgrades are suppressed'; @@ -127,7 +127,7 @@ class ImageBuilder extends Maintenance { $this->init( $count, $table ); $this->output( "Processing $table...\n" ); - $result = wfGetDB( DB_SLAVE )->select( $table, '*', array(), __METHOD__ ); + $result = $this->getDB( DB_SLAVE )->select( $table, '*', array(), __METHOD__ ); foreach ( $result as $row ) { $update = call_user_func( $callback, $row, null );