r91967 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91966‎ | r91967 | r91968 >
Date:15:01, 12 July 2011
Author:ariel
Status:ok
Tags:
Comment:
libxml >= 2.7.3 ha a 10mb cap on the size of a text node and the LIBXML_PARSEHUGE lets us override that, needed for lucid since there are a few revs in the db larger than that limit
Modified paths:
  • /trunk/phase3/includes/Import.php (modified) (history)
  • /trunk/phase3/maintenance/backupPrefetch.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Import.php
@@ -45,7 +45,12 @@
4646
4747 stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' );
4848 $id = UploadSourceAdapter::registerSource( $source );
49 - $this->reader->open( "uploadsource://$id" );
 49+ if (defined( 'LIBXML_PARSEHUGE' ) ) {
 50+ $this->reader->open( "uploadsource://$id", null, LIBXML_PARSEHUGE );
 51+ }
 52+ else {
 53+ $this->reader->open( "uploadsource://$id" );
 54+ }
5055
5156 // Default callbacks
5257 $this->setRevisionCallback( array( $this, "importRevision" ) );
Index: trunk/phase3/maintenance/backupPrefetch.inc
@@ -51,7 +51,12 @@
5252 $this->infiles = explode(';',$infile);
5353 $this->reader = new XMLReader();
5454 $infile = array_shift($this->infiles);
55 - $this->reader->open( $infile );
 55+ if (defined( 'LIBXML_PARSEHUGE' ) ) {
 56+ $this->reader->open( $infile, null, LIBXML_PARSEHUGE );
 57+ }
 58+ else {
 59+ $this->reader->open( $infile );
 60+ }
5661 }
5762
5863 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r91968mft r91967ariel15:12, 12 July 2011
r92349MFT to REL1_18...hashar09:11, 16 July 2011

Status & tagging log