r75557 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75556‎ | r75557 | r75558 >
Date:15:52, 27 October 2010
Author:maxsem
Status:ok
Tags:
Comment:
Introduced $wgAdditionalMailParams to allow adjusting extra email options. Based on patch by Alejandro Mery.
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/UserMailer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -68,6 +68,7 @@
6969 == Patch Contributors ==
7070 * Agbad
7171 * Ahmad Sherif
 72+* Alejandro Mery
7273 * Amalthea
7374 * Antonio Ospite
7475 * Azliq7
Index: trunk/phase3/includes/UserMailer.php
@@ -112,7 +112,7 @@
113113 */
114114 static function send( $to, $from, $subject, $body, $replyto=null, $contentType=null ) {
115115 global $wgSMTP, $wgOutputEncoding, $wgEnotifImpersonal;
116 - global $wgEnotifMaxRecips;
 116+ global $wgEnotifMaxRecips, $wgAdditionalMailParams;
117117
118118 if ( is_array( $to ) ) {
119119 // This wouldn't be necessary if implode() worked on arrays of
@@ -208,10 +208,10 @@
209209
210210 if (is_array($to)) {
211211 foreach ($to as $recip) {
212 - $sent = mail( $recip->toString(), wfQuotedPrintable( $subject ), $body, $headers );
 212+ $sent = mail( $recip->toString(), wfQuotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
213213 }
214214 } else {
215 - $sent = mail( $to->toString(), wfQuotedPrintable( $subject ), $body, $headers );
 215+ $sent = mail( $to->toString(), wfQuotedPrintable( $subject ), $body, $headers, $wgAdditionalMailParams );
216216 }
217217
218218 restore_error_handler();
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1028,6 +1028,11 @@
10291029 */
10301030 $wgSMTP = false;
10311031
 1032+/**
 1033+ * Additional email parameters, will be passed as the last argument to mail() call.
 1034+ */
 1035+$wgAdditionalMailParams = null;
 1036+
10321037 /** For email notification on page changes */
10331038 $wgPasswordSender = $wgEmergencyContact;
10341039
Index: trunk/phase3/RELEASE-NOTES
@@ -78,6 +78,7 @@
7979 * $wgUpgradeKey allows unlocking the web installer for upgrades without having
8080 to move LocalSettings.php
8181 * The FailFunction "error handling" method has now been removed
 82+* $wgAdditionalMailParams added to allow setting extra options to mail() calls.
8283
8384 === New features in 1.17 ===
8485 * (bug 10183) Users can now add personal styles and scripts to all skins via

Follow-up revisions

RevisionCommit summaryAuthorDate
r88391Makes sure wgAdditionalMailParams is null in safe mode...hashar20:28, 18 May 2011

Status & tagging log