require_once __DIR__ . '/Maintenance.php';
+use MediaWiki\MediaWikiServices;
use Wikimedia\Rdbms\IMaintainableDatabase;
/**
}
function addMissingImage( $filename, $fullpath ) {
- global $wgContLang;
-
$timestamp = $this->dbw->timestamp( $this->getRepo()->getFileTimestamp( $fullpath ) );
- $altname = $wgContLang->checkTitleEncoding( $filename );
+ $altname = MediaWikiServices::getInstance()->getContentLanguage()->
+ checkTitleEncoding( $filename );
if ( $altname != $filename ) {
if ( $this->dryrun ) {
$filename = $altname;
}
}
-$maintClass = 'ImageBuilder';
+$maintClass = ImageBuilder::class;
require_once RUN_MAINTENANCE_IF_MAIN;