summaryrefslogtreecommitdiff
path: root/includes/mail
diff options
context:
space:
mode:
Diffstat (limited to 'includes/mail')
-rw-r--r--includes/mail/EmailNotification.php10
-rw-r--r--includes/mail/MailAddress.php2
-rw-r--r--includes/mail/UserMailer.php4
3 files changed, 6 insertions, 10 deletions
diff --git a/includes/mail/EmailNotification.php b/includes/mail/EmailNotification.php
index 8215403e..81c4e38d 100644
--- a/includes/mail/EmailNotification.php
+++ b/includes/mail/EmailNotification.php
@@ -205,8 +205,6 @@ class EmailNotification {
global $wgEnotifWatchlist;
global $wgEnotifMinorEdits, $wgEnotifUserTalk;
- wfProfileIn( __METHOD__ );
-
# The following code is only run, if several conditions are met:
# 1. EmailNotification for pages (other than user_talk pages) must be enabled
# 2. minor edits (changes) are only regarded if the global flag indicates so
@@ -224,9 +222,8 @@ class EmailNotification {
$formattedPageStatus = array( 'deleted', 'created', 'moved', 'restored', 'changed' );
- wfRunHooks( 'UpdateUserMailerFormattedPageStatus', array( &$formattedPageStatus ) );
+ Hooks::run( 'UpdateUserMailerFormattedPageStatus', array( &$formattedPageStatus ) );
if ( !in_array( $this->pageStatus, $formattedPageStatus ) ) {
- wfProfileOut( __METHOD__ );
throw new MWException( 'Not a valid page status!' );
}
@@ -251,7 +248,7 @@ class EmailNotification {
&& $watchingUser->isEmailConfirmed()
&& $watchingUser->getID() != $userTalkId
) {
- if ( wfRunHooks( 'SendWatchlistEmailNotification', array( $watchingUser, $title, $this ) ) ) {
+ if ( Hooks::run( 'SendWatchlistEmailNotification', array( $watchingUser, $title, $this ) ) ) {
$this->compose( $watchingUser );
}
}
@@ -270,7 +267,6 @@ class EmailNotification {
}
$this->sendMails();
- wfProfileOut( __METHOD__ );
}
/**
@@ -295,7 +291,7 @@ class EmailNotification {
) {
if ( !$targetUser->isEmailConfirmed() ) {
wfDebug( __METHOD__ . ": talk page owner doesn't have validated email\n" );
- } elseif ( !wfRunHooks( 'AbortTalkPageEmailNotification', array( $targetUser, $title ) ) ) {
+ } elseif ( !Hooks::run( 'AbortTalkPageEmailNotification', array( $targetUser, $title ) ) ) {
wfDebug( __METHOD__ . ": talk page update notification is aborted for this user\n" );
} else {
wfDebug( __METHOD__ . ": sending talk page update notification\n" );
diff --git a/includes/mail/MailAddress.php b/includes/mail/MailAddress.php
index 68179088..7a228bda 100644
--- a/includes/mail/MailAddress.php
+++ b/includes/mail/MailAddress.php
@@ -38,7 +38,7 @@ class MailAddress {
function __construct( $address, $name = null, $realName = null ) {
if ( is_object( $address ) && $address instanceof User ) {
// Old calling format, now deprecated
- wfDeprecated( __METHOD__ . ' with a User object' , '1.24' );
+ wfDeprecated( __METHOD__ . ' with a User object', '1.24' );
$this->address = $address->getEmail();
$this->name = $address->getName();
$this->realName = $address->getRealName();
diff --git a/includes/mail/UserMailer.php b/includes/mail/UserMailer.php
index b5a57a84..3cabdaeb 100644
--- a/includes/mail/UserMailer.php
+++ b/includes/mail/UserMailer.php
@@ -191,7 +191,7 @@ class UserMailer {
$extraParams = $wgAdditionalMailParams;
// Hook to generate custom VERP address for 'Return-Path'
- wfRunHooks( 'UserMailerChangeReturnPath', array( $to, &$returnPath ) );
+ Hooks::run( 'UserMailerChangeReturnPath', array( $to, &$returnPath ) );
# Add the envelope sender address using the -f command line option when PHP mail() is used.
# Will default to the $from->address when the UserMailerChangeReturnPath hook fails and the
# generated VERP address when the hook runs effectively.
@@ -250,7 +250,7 @@ class UserMailer {
$headers['Content-transfer-encoding'] = '8bit';
}
- $ret = wfRunHooks( 'AlternateUserMailer', array( $headers, $to, $from, $subject, $body ) );
+ $ret = Hooks::run( 'AlternateUserMailer', array( $headers, $to, $from, $subject, $body ) );
if ( $ret === false ) {
// the hook implementation will return false to skip regular mail sending
return Status::newGood();