X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2FUserMailer.php;h=2a549ac49cfb3e425d04822759fdde08e0c7f036;hb=2fe1b773d3da27e379485e049c239d9ac6cd6365;hp=370bac9fe3863455a215c89221230deb6f6caa3d;hpb=2525ceb3cdc1b1c50526ea128af3677fed2049b4;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 370bac9fe3..2a549ac49c 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -260,7 +260,7 @@ class UserMailer { wfDebug( "PEAR Mail_Mime package is not installed. Falling back to text email.\n" ); } else { - require_once( 'Mail/mime.php' ); + require_once 'Mail/mime.php'; if ( wfIsWindows() ) { $body['text'] = str_replace( "\n", "\r\n", $body['text'] ); $body['html'] = str_replace( "\n", "\r\n", $body['html'] ); @@ -300,7 +300,7 @@ class UserMailer { if ( !stream_resolve_include_path( 'Mail.php' ) ) { throw new MWException( 'PEAR mail package is not installed' ); } - require_once( 'Mail.php' ); + require_once 'Mail.php'; wfSuppressWarnings(); @@ -668,11 +668,13 @@ class EmailNotification { } elseif ( $targetUser->getOption( 'enotifusertalkpages' ) && ( !$minorEdit || $targetUser->getOption( 'enotifminoredits' ) ) ) { - if ( $targetUser->isEmailConfirmed() ) { + if ( !$targetUser->isEmailConfirmed() ) { + wfDebug( __METHOD__ . ": talk page owner doesn't have validated email\n" ); + } elseif ( !wfRunHooks( '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" ); return true; - } else { - wfDebug( __METHOD__ . ": talk page owner doesn't have validated email\n" ); } } else { wfDebug( __METHOD__ . ": talk page owner doesn't want notifications\n" );