r24738 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24737‎ | r24738 | r24739 >
Date:06:29, 13 August 2007
Author:aaron
Status:old
Tags:
Comment:
*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
Modified paths:
  • /trunk/phase3/includes/SpecialImport.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialImport.php
@@ -208,7 +208,17 @@
209209 $dbw = wfGetDB( DB_MASTER );
210210 $nullRevision = Revision::newNullRevision(
211211 $dbw, $title->getArticleId(), $comment, true );
212 - $nullRevision->insertOn( $dbw );
 212+ $nullRevId = $nullRevision->insertOn( $dbw );
 213+
 214+ # 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+ );
213223 }
214224 }
215225

Follow-up revisions

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

Status & tagging log