dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Fixup contenttype stuff in UserMailer"
[lhc/web/wiklou.git]
/
includes
/
mail
/
UserMailer.php
diff --git
a/includes/mail/UserMailer.php
b/includes/mail/UserMailer.php
index
5343b2c
..
464e7b8
100644
(file)
--- a/
includes/mail/UserMailer.php
+++ b/
includes/mail/UserMailer.php
@@
-116,7
+116,7
@@
class UserMailer {
*/
public static function send( $to, $from, $subject, $body, $options = [] ) {
global $wgAllowHTMLEmail;
*/
public static function send( $to, $from, $subject, $body, $options = [] ) {
global $wgAllowHTMLEmail;
- $contentType = 'text/plain; charset=UTF-8';
+
if ( !is_array( $options ) ) {
// Old calling style
wfDeprecated( __METHOD__ . ' with $replyto as 5th parameter', '1.26' );
if ( !is_array( $options ) ) {
// Old calling style
wfDeprecated( __METHOD__ . ' with $replyto as 5th parameter', '1.26' );
@@
-125,6
+125,9
@@
class UserMailer {
$options['contentType'] = func_get_arg( 5 );
}
}
$options['contentType'] = func_get_arg( 5 );
}
}
+ if ( !isset( $options['contentType'] ) ) {
+ $options['contentType'] = 'text/plain; charset=UTF-8';
+ }
if ( !is_array( $to ) ) {
$to = [ $to ];
if ( !is_array( $to ) ) {
$to = [ $to ];
@@
-327,8
+330,7
@@
class UserMailer {
$body = str_replace( "\n", "\r\n", $body );
}
$headers['MIME-Version'] = '1.0';
$body = str_replace( "\n", "\r\n", $body );
}
$headers['MIME-Version'] = '1.0';
- $headers['Content-type'] = ( is_null( $contentType ) ?
- 'text/plain; charset=UTF-8' : $contentType );
+ $headers['Content-type'] = $contentType;
$headers['Content-transfer-encoding'] = '8bit';
}
$headers['Content-transfer-encoding'] = '8bit';
}