$limit = 1000;
$untilHappy = true;
}
-$type = isset( $options['type'] ) ? $options['type'] : 'ConcatenatedGzipHistoryBlob';
+$type = isset( $options['type'] ) ? $options['type'] : ConcatenatedGzipHistoryBlob::class;
$dbr = $this->getDB( DB_REPLICA );
+$revQuery = Revision::getQueryInfo( [ 'page', 'text' ] );
$res = $dbr->select(
- [ 'page', 'revision', 'text' ],
- array_merge(
- Revision::selectFields(),
- Revision::selectPageFields(),
- Revision::selectTextFields()
- ),
+ $revQuery['tables'],
+ $revQuery['fields'],
[
'page_namespace' => $title->getNamespace(),
'page_title' => $title->getDBkey(),
- 'page_id=rev_page',
'rev_timestamp > ' . $dbr->addQuotes( $dbr->timestamp( $start ) ),
- 'rev_text_id=old_id'
- ], __FILE__, [ 'LIMIT' => $limit ]
+ ],
+ __FILE__,
+ [ 'LIMIT' => $limit ],
+ $revQuery['joins']
);
$blob = new $type;