Merge "Perform a permission check on the title when changing the page language"
[lhc/web/wiklou.git] / maintenance / rebuildImages.php
index 966864e..109350c 100644 (file)
@@ -63,7 +63,8 @@ class ImageBuilder extends Maintenance {
                $this->dbw = $this->getDB( DB_MASTER );
                $this->dryrun = $this->hasOption( 'dry-run' );
                if ( $this->dryrun ) {
-                       $GLOBALS['wgReadOnly'] = 'Dry run mode, image upgrades are suppressed';
+                       MediaWiki\MediaWikiServices::getInstance()->getReadOnlyMode()
+                               ->setReason( 'Dry run mode, image upgrades are suppressed' );
                }
 
                if ( $this->hasOption( 'missing' ) ) {