r69956 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69955‎ | r69956 | r69957 >
Date:18:50, 26 July 2010
Author:nimishg
Status:deferred
Tags:
Comment:
takes care of the case that a page has more log items than revisions
Modified paths:
  • /trunk/tools/analysis/StreamingXMLHistory.php (modified) (history)

Diff [purge]

Index: trunk/tools/analysis/StreamingXMLHistory.php
@@ -161,6 +161,18 @@
162162 $this->parseRev($reader->readOuterXML());
163163 }//revision
164164 } //while
 165+
 166+ if($this->pagelog && $this->nextLog){
 167+ //note: assumes more page revisions exist than log action items
 168+ while ( $this->nextLog ){
 169+ fputcsv( $this->outputFile, $this->nextLog );
 170+ $this->md5History[] = $md5;
 171+ $this->revTypes[] = new PageAction();
 172+ $this->nextLog = $this->getNextLogDataLine();
 173+ }
 174+ }
 175+
 176+
165177 $this->writeRevisionStatus();
166178
167179 }
@@ -208,8 +220,7 @@
209221 );
210222 $this->oldSize = $textSize;
211223
212 - if($this->pagelog && $this->nextLog){
213 - //note: assumes more page revisions exist than log action items
 224+ if($this->pagelog && $this->nextLog){
214225 while (( $this->nextLog )
215226 && ( $csvData[1] > $this->nextLog[1] )){
216227 fputcsv( $this->outputFile, $this->nextLog );

Status & tagging log