Index: branches/wmf/1.17wmf1/maintenance/backupPrefetch.inc |
— | — | @@ -33,7 +33,12 @@ |
34 | 34 | $this->infiles = explode(';',$infile); |
35 | 35 | $this->reader = new XMLReader(); |
36 | 36 | $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 | + } |
38 | 43 | } |
39 | 44 | |
40 | 45 | /** |
Index: branches/wmf/1.17wmf1/includes/Import.php |
— | — | @@ -44,7 +44,12 @@ |
45 | 45 | |
46 | 46 | stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' ); |
47 | 47 | $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 | + } |
49 | 54 | |
50 | 55 | // Default callbacks |
51 | 56 | $this->setRevisionCallback( array( $this, "importRevision" ) ); |