From 9c2222010f591a3c2fd3443a11597e1be74f9651 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sat, 18 Feb 2012 10:37:11 +0000 Subject: [PATCH] revert r111765 bug 34421 avoid duplicate Subject headers Was removing subjects when sending mails through PEAR. --- includes/UserMailer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 0a02e5280a..d72f1fd12a 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -185,6 +185,7 @@ class UserMailer { $headers['Reply-To'] = $replyto->toString(); } + $headers['Subject'] = self::quotedPrintable( $subject ); $headers['Date'] = date( 'r' ); $headers['MIME-Version'] = '1.0'; $headers['Content-type'] = ( is_null( $contentType ) ? @@ -254,11 +255,10 @@ class UserMailer { $safeMode = wfIniGetBool( 'safe_mode' ); foreach ( $dest as $recip ) { - $quoted_subject = self::quotedPrintable( $subject ); if ( $safeMode ) { - $sent = mail( $recip, $quoted_subject, $body, $headers ); + $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers ); } else { - $sent = mail( $recip, $quoted_subject, $body, $headers, $wgAdditionalMailParams ); + $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams ); } } -- 2.20.1