From: Aaron Schulz Date: Mon, 13 Aug 2007 16:41:10 +0000 (+0000) Subject: *Call Article::updateRevisionOn() to update page record for null revision X-Git-Tag: 1.31.0-rc.0~51787 X-Git-Url: http://git.cyclocoop.org/%22.%24match%5B1%5D.%22?a=commitdiff_plain;h=a5cd60f1342560025523ba6a5743cb7aa5acb3bf;p=lhc%2Fweb%2Fwiklou.git *Call Article::updateRevisionOn() to update page record for null revision --- 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 ); } }