r24749 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24748‎ | r24749 | r24750 >
Date:16:41, 13 August 2007
Author:aaron
Status:old
Tags:
Comment:
*Call Article::updateRevisionOn() to update page record for null revision
Modified paths:
  • /trunk/phase3/includes/SpecialImport.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialImport.php
@@ -208,17 +208,10 @@
209209 $dbw = wfGetDB( DB_MASTER );
210210 $nullRevision = Revision::newNullRevision(
211211 $dbw, $title->getArticleId(), $comment, true );
212 - $nullRevId = $nullRevision->insertOn( $dbw );
213 -
 212+ $nullRevision->insertOn( $dbw );
214213 # Update page record
215 - $dbw->update( 'page',
216 - array( /* SET */
217 - 'page_touched' => $dbw->timestamp(),
218 - 'page_latest' => $nullRevId
219 - ), array( /* WHERE */
220 - 'page_id' => $title->getArticleId()
221 - ), __METHOD__
222 - );
 214+ $article = new Article( $title );
 215+ $article->updateRevisionOn( $dbw, $nullRevision );
223216 }
224217 }
225218

Follow-up revisions

RevisionCommit summaryAuthorDate
r24755Merged revisions 24694-24754 via svnmerge from...david19:48, 13 August 2007

Status & tagging log