r81149 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81148‎ | r81149 | r81150 >
Date:19:16, 28 January 2011
Author:ariel
Status:ok (Comments)
Tags:
Comment:
open a series of files for xml input, if supplied (used for multiple xml prefetch files)
Modified paths:
  • /trunk/phase3/maintenance/backupPrefetch.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/backupPrefetch.inc
@@ -45,9 +45,12 @@
4646 var $atPageEnd = false;
4747 var $lastPage = 0;
4848 var $lastRev = 0;
 49+ var $infiles = null;
4950
5051 function BaseDump( $infile ) {
 52+ $this->infiles = explode(';',$infile);
5153 $this->reader = new XMLReader();
 54+ $infile = array_shift($this->infiles);
5255 $this->reader->open( $infile );
5356 }
5457
@@ -101,7 +104,12 @@
102105 $this->atPageEnd = false;
103106 }
104107 } else {
105 - $this->atEnd = true;
 108+ $this->close();
 109+ if (count($this->infiles)) {
 110+ $infile = array_shift($this->infiles);
 111+ $this->reader->open( $infile );
 112+ $this->atEnd = false;
 113+ }
106114 }
107115 }
108116

Follow-up revisions

RevisionCommit summaryAuthorDate
r814021.17: MFT r79915, r79957, r79964, r79990, r80687, r80999, r81006, r81011, r81...catrope16:18, 2 February 2011

Comments

#Comment by MarkAHershberger (talk | contribs)   22:54, 31 January 2011

missed that atEnd was set in ->close() till I looked at the source.

Status & tagging log