From ccd7758c1e268cb3cf5336dcd650cc136fe5e596 Mon Sep 17 00:00:00 2001 From: Nemo bis Date: Sat, 10 May 2014 09:48:54 +0200 Subject: [PATCH] Extend AbortEmailNotification hook to access log type etc. Bug: 42458 Change-Id: Ifc3935f031c49f9b49ae76c5a8af8334e70ca2b1 --- docs/hooks.txt | 1 + includes/changes/RecentChange.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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, -- 2.20.1