From: Nemo bis Date: Sat, 10 May 2014 07:48:54 +0000 (+0200) Subject: Extend AbortEmailNotification hook to access log type etc. X-Git-Tag: 1.31.0-rc.0~15767 X-Git-Url: http://git.cyclocoop.org/%24dirpuce/puce%24spip_lang_rtl.gif?a=commitdiff_plain;h=ccd7758c1e268cb3cf5336dcd650cc136fe5e596;p=lhc%2Fweb%2Fwiklou.git Extend AbortEmailNotification hook to access log type etc. Bug: 42458 Change-Id: Ifc3935f031c49f9b49ae76c5a8af8334e70ca2b1 --- diff --git a/docs/hooks.txt b/docs/hooks.txt index d455fd2880..626ca5e144 100644 --- a/docs/hooks.txt +++ b/docs/hooks.txt @@ -250,6 +250,7 @@ $block: The block from which the autoblock is coming. 'AbortEmailNotification': Can be used to cancel email notifications for an edit. $editor: The User who made the change. $title: The Title of the page that was edited. +$rc: The current RecentChange object. 'AbortLogin': Return false to cancel account login. $user: the User object being authenticated against diff --git a/includes/changes/RecentChange.php b/includes/changes/RecentChange.php index bbf4ab6f4c..f7beb0c798 100644 --- a/includes/changes/RecentChange.php +++ b/includes/changes/RecentChange.php @@ -279,7 +279,7 @@ class RecentChange { $editor = $this->getPerformer(); $title = $this->getTitle(); - if ( wfRunHooks( 'AbortEmailNotification', array( $editor, $title ) ) ) { + if ( wfRunHooks( 'AbortEmailNotification', array( $editor, $title, $this ) ) ) { # @todo FIXME: This would be better as an extension hook $enotif = new EmailNotification(); $enotif->notifyOnPageChange( $editor, $title,