r91968 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91967‎ | r91968 | r91969 >
Date:15:12, 12 July 2011
Author:ariel
Status:ok
Tags:
Comment:
mft r91967
Modified paths:
  • /branches/wmf/1.17wmf1/includes/Import.php (modified) (history)
  • /branches/wmf/1.17wmf1/maintenance/backupPrefetch.inc (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/maintenance/backupPrefetch.inc
@@ -33,7 +33,12 @@
3434 $this->infiles = explode(';',$infile);
3535 $this->reader = new XMLReader();
3636 $infile = array_shift($this->infiles);
37 - $this->reader->open( $infile );
 37+ if (defined( 'LIBXML_PARSEHUGE' ) ) {
 38+ $this->reader->open( $infile, null, LIBXML_PARSEHUGE );
 39+ }
 40+ else {
 41+ $this->reader->open( $infile );
 42+ }
3843 }
3944
4045 /**
Index: branches/wmf/1.17wmf1/includes/Import.php
@@ -44,7 +44,12 @@
4545
4646 stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' );
4747 $id = UploadSourceAdapter::registerSource( $source );
48 - $this->reader->open( "uploadsource://$id" );
 48+ if (defined( 'LIBXML_PARSEHUGE' ) ) {
 49+ $this->reader->open( "uploadsource://$id", null, LIBXML_PARSEHUGE );
 50+ }
 51+ else {
 52+ $this->reader->open( "uploadsource://$id" );
 53+ }
4954
5055 // Default callbacks
5156 $this->setRevisionCallback( array( $this, "importRevision" ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91967libxml >= 2.7.3 ha a 10mb cap on the size of a text node and the LIBXML_PARSE...ariel15:01, 12 July 2011

Status & tagging log