r37381 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37380‎ | r37381 | r37382 >
Date:11:30, 9 July 2008
Author:raymond
Status:old
Tags:
Comment:
Move the hook 'NewRevisionFromEditComplete'
It should not run if a belated edit conflict occurs.
Issue reported by the German community after some weired revision histories were found.
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1458,14 +1458,14 @@
14591459
14601460 # Update page
14611461 $ok = $this->updateRevisionOn( $dbw, $revision, $lastRevision );
1462 -
1463 - wfRunHooks( 'NewRevisionFromEditComplete', array($this, $revision, $baseRevId) );
14641462
14651463 if( !$ok ) {
14661464 /* Belated edit conflict! Run away!! */
14671465 $good = false;
14681466 $dbw->rollback();
14691467 } else {
 1468+ wfRunHooks( 'NewRevisionFromEditComplete', array( $this, $revision, $baseRevId ) );
 1469+
14701470 # Update recentchanges
14711471 if( !( $flags & EDIT_SUPPRESS_RC ) ) {
14721472 $rcid = RecentChange::notifyEdit( $now, $this->mTitle, $isminor, $wgUser, $summary,

Status & tagging log