From 1098d92d42c96cb94bca68028ebed3ea8d6f3405 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Sat, 4 Dec 2010 19:30:26 +0000 Subject: [PATCH] Follow-up r67324: removed check for empty text since the length is checked explicitly --- maintenance/dumpTextPass.php | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/maintenance/dumpTextPass.php b/maintenance/dumpTextPass.php index 6dcf6608eb..dbd1177246 100644 --- a/maintenance/dumpTextPass.php +++ b/maintenance/dumpTextPass.php @@ -214,18 +214,13 @@ class TextPassDumper extends BackupDumper { $this->fetchCount++; if ( isset( $this->prefetch ) ) { $text = $this->prefetch->prefetch( $this->thisPage, $this->thisRev ); - if ( $text === null ) { - // Entry missing from prefetch dump - } elseif ( $text === "" ) { - // Blank entries may indicate that the prior dump was broken. - // To be safe, reload it. - } else { + if ( $text !== null ) { // Entry missing from prefetch dump $dbr = wfGetDB( DB_SLAVE ); - $revID = intval($this->thisRev); - $revLength = $dbr->selectField( 'revision', 'rev_len', array('rev_id' => $revID ) ); + $revID = intval( $this->thisRev ); + $revLength = $dbr->selectField( 'revision', 'rev_len', array( 'rev_id' => $revID ) ); // if length of rev text in file doesn't match length in db, we reload // this avoids carrying forward broken data from previous xml dumps - if( strlen($text) == $revLength ) { + if( strlen( $text ) == $revLength ) { $this->prefetchCount++; return $text; } -- 2.20.1