build: Upgrade mediawiki-codesniffer from 26.0.0 to 28.0.0
[lhc/web/wiklou.git] / maintenance / fixDefaultJsonContentPages.php
index 460b553..d3d76ac 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Maintenance
  */
 
+use MediaWiki\Revision\RevisionRecord;
+
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -64,12 +66,12 @@ class FixDefaultJsonContentPages extends LoggedUpdateMaintenance {
                                                                'page_id > ' . $dbr->addQuotes( $lastPage )
                                                ],
                                                __METHOD__,
-                                               [ 'ORDER BY' => 'page_id', 'LIMIT' => $this->mBatchSize ]
+                                               [ 'ORDER BY' => 'page_id', 'LIMIT' => $this->getBatchSize() ]
                                );
                                foreach ( $rows as $row ) {
                                        $this->handleRow( $row );
                                }
-                       } while ( $rows->numRows() >= $this->mBatchSize );
+                       } while ( $rows->numRows() >= $this->getBatchSize() );
                }
 
                return true;
@@ -79,7 +81,7 @@ class FixDefaultJsonContentPages extends LoggedUpdateMaintenance {
                $title = Title::makeTitle( $row->page_namespace, $row->page_title );
                $this->output( "Processing {$title} ({$row->page_id})...\n" );
                $rev = Revision::newFromTitle( $title );
-               $content = $rev->getContent( Revision::RAW );
+               $content = $rev->getContent( RevisionRecord::RAW );
                $dbw = $this->getDB( DB_MASTER );
                if ( $content instanceof JsonContent ) {
                        if ( $content->isValid() ) {
@@ -124,5 +126,5 @@ class FixDefaultJsonContentPages extends LoggedUpdateMaintenance {
        }
 }
 
-$maintClass = 'FixDefaultJsonContentPages';
+$maintClass = FixDefaultJsonContentPages::class;
 require_once RUN_MAINTENANCE_IF_MAIN;