X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FUserMailer.php;h=de4457d958a13aa21d5de282474d052d7e7bde75;hb=0929a1fba8ce5914848b7516bcf1dfb44c853e11;hp=e1d00d33f8911a28d3c5f02ea19026ac24367d7d;hpb=5df5a5b4a8ce61cda82af3c636a9b1f3016e6464;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/UserMailer.php b/includes/UserMailer.php index e1d00d33f8..de4457d958 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -262,8 +262,7 @@ class UserMailer { wfDebug( "PEAR Mail_Mime package is not installed. Falling back to text email.\n" ); // remove the html body for text email fall back $body = $body['text']; - } - else { + } else { require_once 'Mail/mime.php'; if ( wfIsWindows() ) { $body['text'] = str_replace( "\n", "\r\n", $body['text'] ); @@ -276,7 +275,7 @@ class UserMailer { $headers = $mime->headers( $headers ); } } - if ( !isset( $mime ) ) { + if ( $mime === null ) { // sending text only, either deliberately or as a fallback if ( wfIsWindows() ) { $body = str_replace( "\n", "\r\n", $body ); @@ -649,7 +648,9 @@ class EmailNotification { && $watchingUser->isEmailConfirmed() && $watchingUser->getID() != $userTalkId ) { - $this->compose( $watchingUser ); + if ( wfRunHooks( 'SendWatchlistEmailNotification', array( $watchingUser, $title, $this ) ) ) { + $this->compose( $watchingUser ); + } } } }