r70586 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70585‎ | r70586 | r70587 >
Date:19:17, 6 August 2010
Author:reedy
Status:ok
Tags:
Comment:
If the user can't retrieve email, theres no point getting their lang!
Modified paths:
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -399,14 +399,17 @@
400400 $title = SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/' . $this->mId );
401401 $title->setFragment( "#c{$commentId}" );
402402 $url = $title->getFullUrl();
 403+
403404 foreach ( $users as $userId => $user ) {
404405 // No sense in notifying this commenter
405406 if ( $wgUser->getId() == $user->getId() ) {
406407 continue;
407408 }
408 - // Send message in receiver's language
409 - $lang = array( 'language' => $user->getOption( 'language' ) );
 409+
410410 if ( $user->canReceiveEmail() ) {
 411+ // Send message in receiver's language
 412+ $lang = array( 'language' => $user->getOption( 'language' ) );
 413+
411414 $user->sendMail(
412415 wfMsgExt( 'codereview-email-subj', $lang, $this->mRepo->getName(), $this->getIdString() ),
413416 wfMsgExt( 'codereview-email-body', $lang, $wgUser->getName(), $url, $this->getIdStringUnique(), $text )

Status & tagging log