
brion at svn
Aug 27, 2008, 2:12 PM
Post #1 of 1
(24 views)
Permalink
|
|
SVN: [40107] trunk/phase3/includes
|
|
Revision: 40107 Author: brion Date: 2008-08-27 21:12:44 +0000 (Wed, 27 Aug 2008) Log Message: ----------- Revert r40042 "* In Article::replaceSection(), actually return null when $section is bogus. Used this in my half-complete and now kind of abandoned attempt at rewriting EditPage.php" This causes regression bug 15340 -- null-edits to a section destroy the rest of the page. Modified Paths: -------------- trunk/phase3/includes/Article.php trunk/phase3/includes/UserMailer.php Modified: trunk/phase3/includes/Article.php =================================================================== --- trunk/phase3/includes/Article.php 2008-08-27 21:03:51 UTC (rev 40106) +++ trunk/phase3/includes/Article.php 2008-08-27 21:12:44 UTC (rev 40107) @@ -1288,9 +1288,6 @@ # Replacing an existing section; roll out the big guns global $wgParser; $text = $wgParser->replaceSection( $oldtext, $section, $text ); - # If $section is bogus, replaceSection() will be a no-op - if($text == $oldtext) - return null; } } Modified: trunk/phase3/includes/UserMailer.php =================================================================== --- trunk/phase3/includes/UserMailer.php 2008-08-27 21:03:51 UTC (rev 40106) +++ trunk/phase3/includes/UserMailer.php 2008-08-27 21:12:44 UTC (rev 40107) @@ -98,10 +98,9 @@ * @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, $contentType=null ) { + static function send( $to, $from, $subject, $body, $replyto=null ) { global $wgSMTP, $wgOutputEncoding, $wgErrorString, $wgEnotifImpersonal; global $wgEnotifMaxRecips; @@ -140,12 +139,7 @@ $headers['Subject'] = wfQuotedPrintable( $subject ); $headers['Date'] = date( 'r' ); $headers['MIME-Version'] = '1.0'; - $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-type'] = 'text/plain; charset='.$wgOutputEncoding; $headers['Content-transfer-encoding'] = '8bit'; $headers['Message-ID'] = "<$msgid@" . $wgSMTP['IDHost'] . '>'; // FIXME $headers['X-Mailer'] = 'MediaWiki mailer'; @@ -176,11 +170,9 @@ } else { $endl = "\n"; } - $ctype = (is_null($contentType) ? - 'text/plain; charset='.$wgOutputEncoding : $contentType); $headers = "MIME-Version: 1.0$endl" . - "Content-type: $ctype$endl" . + "Content-type: text/plain; charset={$wgOutputEncoding}$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
|