http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91967

Revision: 91967
Author:   ariel
Date:     2011-07-12 15:01:58 +0000 (Tue, 12 Jul 2011)
Log Message:
-----------
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
    trunk/phase3/maintenance/backupPrefetch.inc

Modified: trunk/phase3/includes/Import.php
===================================================================
--- trunk/phase3/includes/Import.php    2011-07-12 14:58:58 UTC (rev 91966)
+++ trunk/phase3/includes/Import.php    2011-07-12 15:01:58 UTC (rev 91967)
@@ -45,7 +45,12 @@
 
                stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' 
);
                $id = UploadSourceAdapter::registerSource( $source );
-               $this->reader->open( "uploadsource://$id" );
+               if (defined( 'LIBXML_PARSEHUGE' ) ) {
+                       $this->reader->open( "uploadsource://$id", null, 
LIBXML_PARSEHUGE );
+               }
+               else {
+                       $this->reader->open( "uploadsource://$id" );
+               }
 
                // Default callbacks
                $this->setRevisionCallback( array( $this, "importRevision" ) );

Modified: trunk/phase3/maintenance/backupPrefetch.inc
===================================================================
--- trunk/phase3/maintenance/backupPrefetch.inc 2011-07-12 14:58:58 UTC (rev 
91966)
+++ trunk/phase3/maintenance/backupPrefetch.inc 2011-07-12 15:01:58 UTC (rev 
91967)
@@ -51,7 +51,12 @@
                $this->infiles = explode(';',$infile);
                $this->reader = new XMLReader();
                $infile = array_shift($this->infiles);
-               $this->reader->open( $infile );
+               if (defined( 'LIBXML_PARSEHUGE' ) ) {
+                       $this->reader->open( $infile, null, LIBXML_PARSEHUGE );
+               }
+               else {
+                       $this->reader->open( $infile );
+               }
        }
 
        /**


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to