+ $this->output( "done.\n" );
+ } else {
+ # Get "active" text records via the content table
+ $cur = [];
+ $this->output( 'Searching for active text records via contents table...' );
+ $res = $dbw->select( 'content', 'content_address', [], __METHOD__, [ 'DISTINCT' ] );
+ $blobStore = MediaWikiServices::getInstance()->getBlobStore();
+ foreach ( $res as $row ) {
+ $textId = $blobStore->getTextIdFromAddress( $row->content_address );
+ if ( $textId ) {
+ $cur[] = $textId;
+ }
+ }
+ $this->output( "done.\n" );