diff options
author | daniel <daniel.kinzler@wikimedia.de> | 2018-07-03 14:39:22 +0200 |
---|---|---|
committer | Daniel Kinzler <dkinzler@wikimedia.org> | 2019-03-14 13:19:51 +0000 |
commit | 5988e355054dd73d64acfaef710edd15f9519a60 (patch) | |
tree | efb2243d60ceeed10b23d32bcc038b2f0cadede1 /includes/export/WikiExporter.php | |
parent | 9225d40c0b7147cd6e166b998eecebbc07022d6a (diff) | |
download | mediawikicore-5988e355054dd73d64acfaef710edd15f9519a60.tar.gz mediawikicore-5988e355054dd73d64acfaef710edd15f9519a60.zip |
Make BackupDumper MCR compatible (main slot only)
This makes BackupDumper compatible with the new mechanism for accessing
revision content.
This requires some changes to the way database connections are re-used,
since RevisionStore/SqlBlobStore needs to be able to run queries against
the database while the overall result set is being streamed.
This change does not yet add handing for extra slots to BackupDumper.
That first needs a spec for how extra slots will be represented in the
XML schma (T174031).
NOTE: this changes the output of fetchText from using integer text_id
values to using content_address values (e.g. "tt:4567" for text row
with old_id 4567). It also changes fetchText to accept such addresses
as input, for forward-compatibility. XML stub dumps still use the
numeric format in the id attribute, pending T199121.
Bug: T198706
Change-Id: If4c31b7975b4d901afa8c194c10446c99e27eadf
Diffstat (limited to 'includes/export/WikiExporter.php')
-rw-r--r-- | includes/export/WikiExporter.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/includes/export/WikiExporter.php b/includes/export/WikiExporter.php index 88282bd78cda..123b359695f2 100644 --- a/includes/export/WikiExporter.php +++ b/includes/export/WikiExporter.php @@ -322,10 +322,7 @@ class WikiExporter { } $revOpts = [ 'page' ]; - if ( $this->text != self::STUB ) { - // TODO: remove the text and make XmlDumpWriter use a RevisionStore instead! (T198706) - $revOpts[] = 'text'; - } + $revQuery = Revision::getQueryInfo( $revOpts ); // We want page primary rather than revision @@ -335,8 +332,12 @@ class WikiExporter { ]; unset( $join['page'] ); - // TODO: remove rev_text_id and make XmlDumpWriter use a RevisionStore instead! (T198706) - $fields = array_merge( $revQuery['fields'], [ 'page_restrictions, rev_text_id' ] ); + $fields = $revQuery['fields']; + $fields[] = 'page_restrictions'; + + if ( $this->text != self::STUB ) { + $fields['_load_content'] = '1'; + } $conds = []; if ( $cond !== '' ) { |