* dumpTextPass now skips goes to database for entries that were blank in the
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 11 May 2006 22:56:19 +0000 (22:56 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 11 May 2006 22:56:19 +0000 (22:56 +0000)
  previous dump, as this may indicate a broken dump.

RELEASE-NOTES
maintenance/dumpTextPass.php

index 30fd27e..7b26eb9 100644 (file)
@@ -241,6 +241,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 5891) Linktrail for Polish language (pl)
 * User::isBureaucrat , User::isDeveloper , User::isSysop deprecated in
   v1.6 now die with a backtrace. They will be removed in v1.8
+* dumpTextPass now skips goes to database for entries that were blank in the
+  previous dump, as this may indicate a broken dump.
+
 
 == Compatibility ==
 
index c0ab81b..02eb3d7 100644 (file)
@@ -123,8 +123,14 @@ class TextPassDumper extends BackupDumper {
        function getText( $id ) {
                if( isset( $this->prefetch ) ) {
                        $text = $this->prefetch->prefetch( $this->thisPage, $this->thisRev );
-                       if( !is_null( $text ) )
+                       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 {
                                return $text;
+                       }
                }
                $id = intval( $id );
                $row = $this->db->selectRow( 'text',