Fix off by 1 error when displaying the number of a line with an error
[lhc/web/wiklou.git] / maintenance / cleanupTitles.php
index 5b441f9..7f0e340 100644 (file)
@@ -38,15 +38,15 @@ class TitleCleanup extends TableCleanup {
        public function __construct() {
                parent::__construct();
                $this->addDescription( 'Script to clean up broken, unparseable titles' );
+               $this->batchSize = 1000;
        }
 
        /**
         * @param object $row
         */
        protected function processRow( $row ) {
-               global $wgContLang;
                $display = Title::makeName( $row->page_namespace, $row->page_title );
-               $verified = $wgContLang->normalize( $display );
+               $verified = MediaWikiServices::getInstance()->getContentLanguage()->normalize( $display );
                $title = Title::newFromText( $verified );
 
                if ( !is_null( $title )