*/
private function checkOrphans( $fix ) {
$dbw = $this->getDB( DB_MASTER );
- $commentStore = new CommentStore( 'rev_comment' );
+ $commentStore = CommentStore::getStore();
if ( $fix ) {
$this->lockTables( $dbw );
}
- $commentQuery = $commentStore->getJoin();
+ $commentQuery = $commentStore->getJoin( 'rev_comment' );
$this->output( "Checking for orphan revision table entries... "
. "(this may take a while on a large wiki)\n" );
) );
foreach ( $result as $row ) {
- $comment = $commentStore->getComment( $row )->text;
+ $comment = $commentStore->getComment( 'rev_comment', $row )->text;
if ( $comment !== '' ) {
$comment = '(' . $wgContLang->truncate( $comment, 40 ) . ')';
}
}
}
-$maintClass = "Orphans";
+$maintClass = Orphans::class;
require_once RUN_MAINTENANCE_IF_MAIN;