r77737 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77736‎ | r77737 | r77738 >
Date:19:30, 4 December 2010
Author:ialex
Status:ok
Tags:
Comment:
Follow-up r67324: removed check for empty text since the length is checked explicitly
Modified paths:
  • /trunk/phase3/maintenance/dumpTextPass.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/dumpTextPass.php
@@ -214,18 +214,13 @@
215215 $this->fetchCount++;
216216 if ( isset( $this->prefetch ) ) {
217217 $text = $this->prefetch->prefetch( $this->thisPage, $this->thisRev );
218 - if ( $text === null ) {
219 - // Entry missing from prefetch dump
220 - } elseif ( $text === "" ) {
221 - // Blank entries may indicate that the prior dump was broken.
222 - // To be safe, reload it.
223 - } else {
 218+ if ( $text !== null ) { // Entry missing from prefetch dump
224219 $dbr = wfGetDB( DB_SLAVE );
225 - $revID = intval($this->thisRev);
226 - $revLength = $dbr->selectField( 'revision', 'rev_len', array('rev_id' => $revID ) );
 220+ $revID = intval( $this->thisRev );
 221+ $revLength = $dbr->selectField( 'revision', 'rev_len', array( 'rev_id' => $revID ) );
227222 // if length of rev text in file doesn't match length in db, we reload
228223 // this avoids carrying forward broken data from previous xml dumps
229 - if( strlen($text) == $revLength ) {
 224+ if( strlen( $text ) == $revLength ) {
230225 $this->prefetchCount++;
231226 return $text;
232227 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67324XML snapshots: check length of revision text from prefetched content against ...ariel03:10, 4 June 2010

Status & tagging log