From 53cc70176a4301c893bf150e5fcdb449f1814c43 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 13 Aug 2007 06:29:08 +0000 Subject: [PATCH] *Update page_latest to reflect the null revision, like protection and such do. This was causing issues with revisiondelete mixing the top and second to the top edits --- includes/SpecialImport.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index 8dee732d44..0dd25e7fbd 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -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__ + ); } } -- 2.20.1