From dd00e0dee22ec7f305f8dd7578eb17a4ec5488e8 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Fri, 17 Feb 2012 17:02:24 +0000 Subject: [PATCH] (bug 34421) avoid duplicate Subject headers r93397 duplicated the Subject header which was passed to the mail() function as well as to the $headers array. --- includes/UserMailer.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 14fd965025..0a2c2425f0 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -184,7 +184,6 @@ 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,10 +253,11 @@ class UserMailer { $safeMode = wfIniGetBool( 'safe_mode' ); foreach ( $dest as $recip ) { + $quoted_subject = self::quotedPrintable( $subject ); if ( $safeMode ) { - $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers ); + $sent = mail( $recip, $quoted_subject, $body, $headers ); } else { - $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams ); + $sent = mail( $recip, $quoted_subject, $body, $headers, $wgAdditionalMailParams ); } } -- 2.20.1