X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fexport%2FWikiExporter.php;h=b0185843e286bf633e1d6fafe7ea269ba9f588cd;hp=6c7a449372513b156ddcebc1d1a5584a3510d6bb;hb=74d04edec385aa86ee01943b9a27475d79f74e78;hpb=4b2f95bed5a9ae0a917264abed2ba1fd9fb78f3c diff --git a/includes/export/WikiExporter.php b/includes/export/WikiExporter.php index 6c7a449372..b0185843e2 100644 --- a/includes/export/WikiExporter.php +++ b/includes/export/WikiExporter.php @@ -263,6 +263,8 @@ class WikiExporter { * @throws Exception */ protected function dumpFrom( $cond = '', $orderRevs = false ) { + global $wgMultiContentRevisionSchemaMigrationStage; + # For logging dumps... if ( $this->history & self::LOGS ) { $where = []; @@ -330,8 +332,17 @@ class WikiExporter { } # For page dumps... } else { + if ( !( $wgMultiContentRevisionSchemaMigrationStage & SCHEMA_COMPAT_WRITE_OLD ) ) { + // TODO: Make XmlDumpWriter use a RevisionStore! (see T198706 and T174031) + throw new MWException( + 'Cannot use WikiExporter with SCHEMA_COMPAT_WRITE_OLD mode disabled!' + . ' Support for dumping from the new schema is not implemented yet!' + ); + } + $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 ); @@ -343,7 +354,8 @@ class WikiExporter { ]; unset( $join['page'] ); - $fields = array_merge( $revQuery['fields'], [ 'page_restrictions' ] ); + // TODO: remove rev_text_id and make XmlDumpWriter use a RevisionStore instead! (T198706) + $fields = array_merge( $revQuery['fields'], [ 'page_restrictions, rev_text_id' ] ); $conds = []; if ( $cond !== '' ) {