r70535 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70534‎ | r70535 | r70536 >
Date:00:59, 6 August 2010
Author:nimishg
Status:deferred
Tags:
Comment:
moving this code chunk back where it goes...
Modified paths:
  • /trunk/tools/analysis/StreamingXMLHistory.php (modified) (history)

Diff [purge]

Index: trunk/tools/analysis/StreamingXMLHistory.php
@@ -234,7 +234,17 @@
235235 $isNew = "no";
236236
237237 $revertIndex = array_search($md5, $this->md5History);
238 -
 238+ if($revertIndex === FALSE ){
 239+ $isNew = 'yes';
 240+ $this->revTypes[] = new Edit(true);
 241+ }
 242+ else{
 243+ $revert = new Revert(count($this->revTypes), $this->revTypes, true, $revertIndex);
 244+ $this->revTypes[] = $revert;
 245+ $revert->updateHistory();
 246+ }
 247+ $this->md5History[] = $md5;
 248+
239249 $csvData = array(
240250 $revision->id,
241251 strtotime($revision->timestamp),
@@ -260,19 +270,7 @@
261271 $this->nextLog = $this->getNextLogDataLine();
262272 }
263273 }
264 - fputcsv($this->outputFile, $csvData);
265 -
266 - if($revertIndex === FALSE ){
267 - $isNew = 'yes';
268 - $this->revTypes[] = new Edit(true);
269 - }
270 - else{
271 - $revert = new Revert(count($this->revTypes), $this->revTypes, true, $revertIndex);
272 - $this->revTypes[] = $revert;
273 - $revert->updateHistory();
274 - }
275 - $this->md5History[] = $md5;
276 -
 274+ fputcsv($this->outputFile, $csvData);
277275 }
278276
279277

Status & tagging log