From a5cd60f1342560025523ba6a5743cb7aa5acb3bf Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 13 Aug 2007 16:41:10 +0000 Subject: [PATCH] *Call Article::updateRevisionOn() to update page record for null revision --- includes/SpecialImport.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index 0dd25e7fbd..ad5d8e64a7 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -208,17 +208,10 @@ class ImportReporter { $dbw = wfGetDB( DB_MASTER ); $nullRevision = Revision::newNullRevision( $dbw, $title->getArticleId(), $comment, true ); - $nullRevId = $nullRevision->insertOn( $dbw ); - + $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__ - ); + $article = new Article( $title ); + $article->updateRevisionOn( $dbw, $nullRevision ); } } -- 2.20.1