r111765 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111764‎ | r111765 | r111766 >
Date:17:02, 17 February 2012
Author:hashar
Status:reverted (Comments)
Tags:
Comment:
(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.
Modified paths:
  • /trunk/phase3/includes/UserMailer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/UserMailer.php
@@ -184,7 +184,6 @@
185185 $headers['Reply-To'] = $replyto->toString();
186186 }
187187
188 - $headers['Subject'] = self::quotedPrintable( $subject );
189188 $headers['Date'] = date( 'r' );
190189 $headers['MIME-Version'] = '1.0';
191190 $headers['Content-type'] = ( is_null( $contentType ) ?
@@ -254,10 +253,11 @@
255254
256255 $safeMode = wfIniGetBool( 'safe_mode' );
257256 foreach ( $dest as $recip ) {
 257+ $quoted_subject = self::quotedPrintable( $subject );
258258 if ( $safeMode ) {
259 - $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers );
 259+ $sent = mail( $recip, $quoted_subject, $body, $headers );
260260 } else {
261 - $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
 261+ $sent = mail( $recip, $quoted_subject, $body, $headers, $wgAdditionalMailParams );
262262 }
263263 }
264264

Follow-up revisions

RevisionCommit summaryAuthorDate
r111819revert r111765 bug 34421 avoid duplicate Subject headers...hashar10:37, 18 February 2012
r111820(bug 34421) avoid duplicate Subject headers in mail...hashar10:57, 18 February 2012
r111832(bug 34421) duplicate Subject / wrong To: headers in mail...hashar15:34, 18 February 2012
r111925MFT to 1.19wmf1 r111832...hashar13:32, 20 February 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93397Reduce mail header differences by moving all the header creation code...mah16:56, 28 July 2011

Comments

#Comment by Hashar (talk | contribs)   22:06, 17 February 2012

This commit is removing the Subject header when sending mails using PEAR so we need a better fix :-)

Status & tagging log