r82591 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82590‎ | r82591 | r82592 >
Date:06:45, 22 February 2011
Author:aaron
Status:ok
Tags:
Comment:
(bug 25311) Use content language for email to $wgConfirmAccountContact when a user confirms their address
Modified paths:
  • /trunk/extensions/ConfirmAccount/RequestAccount_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/RequestAccount_body.php
@@ -486,7 +486,12 @@
487487 global $wgOut;
488488 $wgOut->addHTML( wfMsgExt( 'acct_request_throttle_hit', 'parsemag', $limit ) );
489489 }
490 -
 490+
 491+ /**
 492+ * (a) Try to confirm an email address via a token
 493+ * (b) Notify $wgConfirmAccountContact on success
 494+ * @param int $limit number of accounts allowed to be requested from the same IP
 495+ */
491496 protected function confirmEmailToken( $code ) {
492497 global $wgUser, $wgOut, $wgConfirmAccountContact, $wgPasswordSender;
493498 # Confirm if this token is in the pending requests
@@ -499,15 +504,16 @@
500505 $target = new MailAddress( $wgConfirmAccountContact );
501506 $source = new MailAddress( $wgPasswordSender );
502507 $title = SpecialPage::getTitleFor( 'ConfirmAccounts' );
503 - $subject = wfMsg( 'requestaccount-email-subj-admin' );
504 - $body = wfMsg( 'requestaccount-email-body-admin', $name, $title->getFullUrl() );
 508+ $subject = wfMsgForContent( 'requestaccount-email-subj-admin' );
 509+ $body = wfMsgForContent(
 510+ 'requestaccount-email-body-admin', $name, $title->getFullUrl() );
505511 # Actually send the email...
506512 $result = UserMailer::send( $target, $source, $subject, $body );
507513 if ( WikiError::isError( $result ) ) {
508514 wfDebug( "Could not sent email to admin at $target\n" );
509515 }
510516 }
511 - $wgOut->addWikiText( wfMsgHtml( 'request-account-econf' ) );
 517+ $wgOut->addWikiMsg( 'request-account-econf' );
512518 $wgOut->returnToMain();
513519 return;
514520 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r73761"New account" email should be in the content language, not the confirming adm...aaron20:57, 25 September 2010

Status & tagging log