* @ingroup Maintenance
*/
+use MediaWiki\MediaWikiServices;
+
require_once __DIR__ . '/cleanupTable.inc';
/**
*
* @ingroup Maintenance
*/
-class WatchlistCleanup extends TableCleanup {
+class CleanupWatchlist extends TableCleanup {
protected $defaultParams = [
'table' => 'watchlist',
'index' => [ 'wl_user', 'wl_namespace', 'wl_title' ],
}
protected function processRow( $row ) {
- global $wgContLang;
$current = Title::makeTitle( $row->wl_namespace, $row->wl_title );
$display = $current->getPrefixedText();
- $verified = $wgContLang->normalize( $display );
+ $verified = MediaWikiServices::getInstance()->getContentLanguage()->normalize( $display );
$title = Title::newFromText( $verified );
if ( $row->wl_user == 0 || is_null( $title ) || !$title->equals( $current ) ) {
}
}
-$maintClass = WatchlistCleanup::class;
+$maintClass = CleanupWatchlist::class;
require_once RUN_MAINTENANCE_IF_MAIN;