Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Wikipedia: Mediawiki-CVS

SVN: [40108] trunk/phase3/includes/UserMailer.php

 

 

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded


catrope at svn

Aug 27, 2008, 2:15 PM

Post #1 of 1 (19 views)
Permalink
SVN: [40108] trunk/phase3/includes/UserMailer.php

Revision: 40108
Author: catrope
Date: 2008-08-27 21:15:42 +0000 (Wed, 27 Aug 2008)

Log Message:
-----------
Revert part of r40107 (Revert r40042 because of regressions). The changes to UserMailer.php had nothing to do with that bug.

Modified Paths:
--------------
trunk/phase3/includes/UserMailer.php

Modified: trunk/phase3/includes/UserMailer.php
===================================================================
--- trunk/phase3/includes/UserMailer.php 2008-08-27 21:12:44 UTC (rev 40107)
+++ trunk/phase3/includes/UserMailer.php 2008-08-27 21:15:42 UTC (rev 40108)
@@ -98,9 +98,10 @@
* @param $subject String: email's subject.
* @param $body String: email's text.
* @param $replyto String: optional reply-to email (default: null).
+ * @param $contentType String: optional custom Content-Type
* @return mixed True on success, a WikiError object on failure.
*/
- static function send( $to, $from, $subject, $body, $replyto=null ) {
+ static function send( $to, $from, $subject, $body, $replyto=null, $contentType=null ) {
global $wgSMTP, $wgOutputEncoding, $wgErrorString, $wgEnotifImpersonal;
global $wgEnotifMaxRecips;

@@ -139,7 +140,12 @@
$headers['Subject'] = wfQuotedPrintable( $subject );
$headers['Date'] = date( 'r' );
$headers['MIME-Version'] = '1.0';
- $headers['Content-type'] = 'text/plain; charset='.$wgOutputEncoding;
+ $headers['Content-type'] = (is_null($contentType) ?
+ 'text/plain; charset='.$wgOutputEncoding : $contentType);
+ if(is_null($contentType))
+ $headers['Content-type'] = 'text/plain; charset='.$wgOutputEncoding;
+ else
+ $headers['Content-type'] = $contentType;
$headers['Content-transfer-encoding'] = '8bit';
$headers['Message-ID'] = "<$msgid@" . $wgSMTP['IDHost'] . '>'; // FIXME
$headers['X-Mailer'] = 'MediaWiki mailer';
@@ -170,9 +176,11 @@
} else {
$endl = "\n";
}
+ $ctype = (is_null($contentType) ?
+ 'text/plain; charset='.$wgOutputEncoding : $contentType);
$headers =
"MIME-Version: 1.0$endl" .
- "Content-type: text/plain; charset={$wgOutputEncoding}$endl" .
+ "Content-type: $ctype$endl" .
"Content-Transfer-Encoding: 8bit$endl" .
"X-Mailer: MediaWiki mailer$endl".
'From: ' . $from->toString();



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS[at]lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Wikipedia mediawiki-cvs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.