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'] );
$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 );
&& $watchingUser->isEmailConfirmed()
&& $watchingUser->getID() != $userTalkId
) {
- $this->compose( $watchingUser );
+ if ( wfRunHooks( 'SendWatchlistEmailNotification', array( $watchingUser, $title, $this ) ) ) {
+ $this->compose( $watchingUser );
+ }
}
}
}