From: Aaron Schulz Date: Mon, 13 Aug 2007 06:29:08 +0000 (+0000) Subject: *Update page_latest to reflect the null revision, like protection and such do. This... X-Git-Tag: 1.31.0-rc.0~51791 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=53cc70176a4301c893bf150e5fcdb449f1814c43;p=lhc%2Fweb%2Fwiklou.git *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 --- 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__ + ); } }