r73761 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73760‎ | r73761 | r73762 >
Date:20:57, 25 September 2010
Author:aaron
Status:deferred
Tags:
Comment:
"New account" email should be in the content language, not the confirming admin's (bug 25311)
Modified paths:
  • /trunk/extensions/ConfirmAccount/ConfirmAccount_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
@@ -431,11 +431,17 @@
432432 # Do not send multiple times, don't send for "spam" requests
433433 if( !$row->acr_rejected && $this->submitType != 'spam' ) {
434434 if( $this->reason ) {
435 - $result = $u->sendMail( wfMsg( 'confirmaccount-email-subj' ),
436 - wfMsgExt( 'confirmaccount-email-body4', array('parsemag'), $u->getName(), $this->reason ) );
 435+ $result = $u->sendMail(
 436+ wfMsgForContent( 'confirmaccount-email-subj' ),
 437+ wfMsgExt( 'confirmaccount-email-body4',
 438+ array('parsemag','content'), $u->getName(), $this->reason )
 439+ );
437440 } else {
438 - $result = $u->sendMail( wfMsg( 'confirmaccount-email-subj' ),
439 - wfMsgExt( 'confirmaccount-email-body3', array('parsemag'), $u->getName() ) );
 441+ $result = $u->sendMail(
 442+ wfMsgForContent( 'confirmaccount-email-subj' ),
 443+ wfMsgExt( 'confirmaccount-email-body3',
 444+ array('parsemag','content'), $u->getName() )
 445+ );
440446 }
441447
442448 if( WikiError::isError( $result ) ) {
@@ -568,23 +574,27 @@
569575 $msg = "confirmaccount-email-body2-pos{$this->mType}";
570576 # If the user is in a group and there is a welcome for that group, use it
571577 if( $group && !wfEmptyMsg( $msg, wfMsg($msg) ) ) {
572 - $ebody = wfMsgExt($msg, array('parsemag'), $user->getName(), $p, $this->reason );
 578+ $ebody = wfMsgExt( $msg, array('parsemag','content'),
 579+ $user->getName(), $p, $this->reason );
573580 # Use standard if none found...
574581 } else {
575 - $ebody = wfMsgExt( 'confirmaccount-email-body2', array('parsemag'), $user->getName(), $p, $this->reason );
 582+ $ebody = wfMsgExt( 'confirmaccount-email-body2',
 583+ array('parsemag','content'), $user->getName(), $p, $this->reason );
576584 }
577585 } else {
578586 $msg = "confirmaccount-email-body-pos{$this->mType}";
579587 # If the user is in a group and there is a welcome for that group, use it
580588 if( $group && !wfEmptyMsg( $msg, wfMsg($msg) ) ) {
581 - $ebody = wfMsgExt($msg, array('parsemag'), $user->getName(), $p, $this->reason );
 589+ $ebody = wfMsgExt($msg, array('parsemag','content'),
 590+ $user->getName(), $p, $this->reason );
582591 # Use standard if none found...
583592 } else {
584 - $ebody = wfMsgExt( 'confirmaccount-email-body', array('parsemag'), $user->getName(), $p, $this->reason );
 593+ $ebody = wfMsgExt( 'confirmaccount-email-body',
 594+ array('parsemag','content'), $user->getName(), $p, $this->reason );
585595 }
586596 }
587597
588 - $result = $user->sendMail( wfMsg( 'confirmaccount-email-subj' ), $ebody );
 598+ $result = $user->sendMail( wfMsgForContent( 'confirmaccount-email-subj' ), $ebody );
589599
590600 // init $error
591601 $error = '';
@@ -707,8 +717,11 @@
708718
709719 # Do not send multiple times
710720 if( !$row->acr_held && !($row->acr_deleted && $row->acr_deleted !='f') ) {
711 - $result = $u->sendMail( wfMsg( 'confirmaccount-email-subj' ),
712 - wfMsgExt( 'confirmaccount-email-body5', array('parsemag'), $u->getName(), $this->reason ) );
 721+ $result = $u->sendMail(
 722+ wfMsgForContent( 'confirmaccount-email-subj' ),
 723+ wfMsgExt( 'confirmaccount-email-body5',
 724+ array('parsemag','content'), $u->getName(), $this->reason )
 725+ );
713726 if( WikiError::isError( $result ) ) {
714727 $dbw->rollback();
715728 $error = wfMsg( 'mailerror', htmlspecialchars( $result->toString() ) );

Follow-up revisions

RevisionCommit summaryAuthorDate
r82591(bug 25311) Use content language for email to $wgConfirmAccountContact when a...aaron06:45, 22 February 2011

Status & tagging log