From: Antoine Musso Date: Fri, 17 Feb 2012 17:02:24 +0000 (+0000) Subject: (bug 34421) avoid duplicate Subject headers X-Git-Tag: 1.31.0-rc.0~24653 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=dd00e0dee22ec7f305f8dd7578eb17a4ec5488e8;p=lhc%2Fweb%2Fwiklou.git (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. --- 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 ); } }