r99411 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99410‎ | r99411 | r99412 >
Date:17:41, 10 October 2011
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Unbreak sending emails using mailTargets() in safe_mode
Modified paths:
  • /trunk/phase3/includes/UserMailer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/UserMailer.php
@@ -256,8 +256,13 @@
257257 ini_set( 'html_errors', '0' );
258258 set_error_handler( 'UserMailer::errorHandler' );
259259
 260+ $safeMode = wfIniGetBool( 'safe_mode' );
260261 foreach ( $dest as $recip ) {
261 - $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
 262+ if ( $safeMode ) {
 263+ $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers );
 264+ } else {
 265+ $sent = mail( $recip, self::quotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
 266+ }
262267 }
263268
264269 restore_error_handler();

Sign-offs

UserFlagDate
Nikerabbitinspected15:28, 11 October 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r108904No need to do the safe_mode check on every request in $wgAdditionalMailParams...ialex14:53, 14 January 2012

Comments

#Comment by MaxSem (talk | contribs)   17:42, 10 October 2011

Inaccurate typing: should read mail() instead of mailTargets() :)

Status & tagging log