From: Reedy Date: Thu, 21 Jan 2016 01:12:41 +0000 (+0000) Subject: Remove deprecated calling style of UserMailer::send() X-Git-Tag: 1.31.0-rc.0~7406 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=0f5e26ee41633ed1e638601eb5244c0d9143e65b;p=lhc%2Fweb%2Fwiklou.git Remove deprecated calling style of UserMailer::send() Depends-On: I513639f706ce16334180908f55638eebf8a4de80 Depends-On: I3fce6c666e2c878a221e2e4c6acacfd0254d173a Change-Id: I475932f37a579dd86bfd98e6b14509d6ba86f128 --- diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27 index b6161da624..0aebf38710 100644 --- a/RELEASE-NOTES-1.27 +++ b/RELEASE-NOTES-1.27 @@ -398,9 +398,11 @@ changes to languages because of Phabricator reports. * Skin::getUsableSkins() was removed (deprecated since 1.23). * LoadBalancer::pickRandom() was removed (deprecated in 1.21). * Article::getUndoText() and WikiPage::getUndoText were removed (deprecated since - 1.21). + 1.21). * DifferenceEngine::setText() was removed (deprecated in 1.21). * Title::newFromRedirectArray() was removed (deprecated in 1.21). +* UserMailer::send() no longer accepts $replyto as the 5th argument and $contentType + as the 6th. These must be passed in the options array now. == Compatibility == diff --git a/includes/mail/UserMailer.php b/includes/mail/UserMailer.php index 1c7fb9857b..1059d7bce2 100644 --- a/includes/mail/UserMailer.php +++ b/includes/mail/UserMailer.php @@ -107,9 +107,6 @@ class UserMailer { * 'contentType' string default 'text/plain; charset=UTF-8' * 'headers' array Extra headers to set * - * Previous versions of this function had $replyto as the 5th argument and $contentType - * as the 6th. These are still supported for backwards compatability, but deprecated. - * * @throws MWException * @throws Exception * @return Status @@ -117,14 +114,6 @@ class UserMailer { public static function send( $to, $from, $subject, $body, $options = [] ) { global $wgAllowHTMLEmail; - if ( !is_array( $options ) ) { - // Old calling style - wfDeprecated( __METHOD__ . ' with $replyto as 5th parameter', '1.26' ); - $options = [ 'replyTo' => $options ]; - if ( func_num_args() === 6 ) { - $options['contentType'] = func_get_arg( 5 ); - } - } if ( !isset( $options['contentType'] ) ) { $options['contentType'] = 'text/plain; charset=UTF-8'; }