*Update page_latest to reflect the null revision, like protection and such do. This...
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Aug 2007 06:29:08 +0000 (06:29 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Aug 2007 06:29:08 +0000 (06:29 +0000)
includes/SpecialImport.php

index 8dee732..0dd25e7 100644 (file)
@@ -208,7 +208,17 @@ class ImportReporter {
                        $dbw = wfGetDB( DB_MASTER );
                        $nullRevision = Revision::newNullRevision(
                                $dbw, $title->getArticleId(), $comment, true );
-                       $nullRevision->insertOn( $dbw );
+                       $nullRevId = $nullRevision->insertOn( $dbw );
+                       
+                       # Update page record
+                       $dbw->update( 'page',
+                               array( /* SET */
+                                       'page_touched' => $dbw->timestamp(),
+                                       'page_latest' => $nullRevId
+                               ), array( /* WHERE */
+                                       'page_id' => $title->getArticleId()
+                               ), __METHOD__
+                       );
                }
        }