Extend AbortEmailNotification hook to access log type etc.
authorNemo bis <federicoleva@tiscali.it>
Sat, 10 May 2014 07:48:54 +0000 (09:48 +0200)
committerIAlex <codereview@emsenhuber.ch>
Sun, 11 May 2014 09:39:14 +0000 (09:39 +0000)
Bug: 42458
Change-Id: Ifc3935f031c49f9b49ae76c5a8af8334e70ca2b1

docs/hooks.txt
includes/changes/RecentChange.php

index d455fd2..626ca5e 100644 (file)
@@ -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
index bbf4ab6..f7beb0c 100644 (file)
@@ -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,