From: Raimond Spekking Date: Wed, 9 Jul 2008 11:30:34 +0000 (+0000) Subject: Move the hook 'NewRevisionFromEditComplete' X-Git-Tag: 1.31.0-rc.0~46610 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=51cc020b3a73cdefcaeacb0f38e640ebec29294a;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/includes/Article.php b/includes/Article.php index 0c24e707d1..4d8277bb2b 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1458,14 +1458,14 @@ class Article { # Update page $ok = $this->updateRevisionOn( $dbw, $revision, $lastRevision ); - - wfRunHooks( 'NewRevisionFromEditComplete', array($this, $revision, $baseRevId) ); if( !$ok ) { /* Belated edit conflict! Run away!! */ $good = false; $dbw->rollback(); } else { + wfRunHooks( 'NewRevisionFromEditComplete', array( $this, $revision, $baseRevId ) ); + # Update recentchanges if( !( $flags & EDIT_SUPPRESS_RC ) ) { $rcid = RecentChange::notifyEdit( $now, $this->mTitle, $isminor, $wgUser, $summary,