From: Brion Vibber Date: Wed, 24 May 2006 09:05:49 +0000 (+0000) Subject: * Add 'DiffViewHeader' hook called before diff page output X-Git-Tag: 1.31.0-rc.0~57052 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=6e71a93363b219d4118cd5e0927980e7db1253dd;p=lhc%2Fweb%2Fwiklou.git * Add 'DiffViewHeader' hook called before diff page output --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 6eec82c953..3c14858dc1 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -321,6 +321,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Only the first __TOC__ is now turned into a TOC * (bug 4610) Indicate patrolled status on watchlists and allow users to mark changes as patrolled using the diff links there +* Add 'DiffViewHeader' hook called before diff page output + == Compatibility == diff --git a/docs/hooks.txt b/docs/hooks.txt index f39165a636..48b8e17f78 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -297,6 +297,11 @@ $user: the user _doing_ the block (not the one being blocked) $block: the Block object that was saved $user: the user who did the block (not the one being blocked) +'DiffViewHeader': called before diff display +$diff: DifferenceEngine object that's calling +$oldRev: Revision object of the "old" revision (may be null/invalid) +$newRev: Revision object of the "new" revision + 'EditFilter': Perform checks on an edit $editor: Edit form (see includes/EditPage.php) $text: Contents of the edit box diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 3a1cd71c27..67a7f1044b 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -114,6 +114,9 @@ CONTROL; wfProfileOut( $fname ); return; } + + wfRunHooks( 'DiffViewHeader', array( $this, $this->mOldRev, $this->mNewRev ) ); + if ( $this->mNewRev->isCurrent() ) { $wgOut->setArticleFlag( true ); }