r100292 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100291‎ | r100292 | r100293 >
Date:23:30, 19 October 2011
Author:reedy
Status:ok
Tags:
Comment:
Added new globals to override the email sender address/name, defaults to MW $$wgContestMailSender and $wgContestMailSenderName
Modified paths:
  • /trunk/extensions/Contest/Contest.php (modified) (history)
  • /trunk/extensions/Contest/includes/ContestContestant.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Contest/Contest.php
@@ -165,7 +165,7 @@
166166 'contest-contest-reminder-send',
167167 'contest-contest-reminder-preview',
168168 'contest-contest-reminder-sending',
169 - 'contest-contest-reminder-success',
 169+ 'contest-contest-reminder-success',
170170 'contest-contest-reminder-close',
171171 'contest-contest-reminder-retry',
172172 'contest-contest-reminder-failed',
@@ -294,3 +294,6 @@
295295 $egContestSettings = array();
296296
297297 $wgContestEmailParse = false;
 298+
 299+$wgContestMailSender = $wgPasswordSender;
 300+$wgContestMailSenderName = $wgPasswordSenderName;
Index: trunk/extensions/Contest/includes/ContestContestant.php
@@ -489,13 +489,13 @@
490490 * @return Status
491491 */
492492 public function sendSignupEmail() {
493 - global $wgPasswordSender, $wgPasswordSenderName;
 493+ global $wgContestMailSender, $wgContestMailSenderName;
494494
495495 $title = wfMsg( 'contest-email-signup-title' );
496496 $emailText = ContestUtils::getParsedArticleContent( $this->getContest()->getField( 'signup_email' ) );
497497 $user = $this->getUser();
498 - $sender = $wgPasswordSender;
499 - $senderName = $wgPasswordSenderName;
 498+ $sender = $wgContestMailSender;
 499+ $senderName = $wgContestMailSenderName;
500500
501501 wfRunHooks( 'ContestBeforeSignupEmail', array( &$this, &$title, &$emailText, &$user, &$sender, &$senderName ) );
502502
@@ -517,7 +517,7 @@
518518 * @return Status
519519 */
520520 public function sendReminderEmail( $emailText, array $params = array() ) {
521 - global $wgPasswordSender, $wgPasswordSenderName;
 521+ global $wgContestMailSender, $wgContestMailSenderName;
522522
523523 if ( !array_key_exists( 'daysLeft', $params ) ) {
524524 $params['daysLeft'] = $this->getContest()->getDaysLeft();
@@ -525,8 +525,8 @@
526526
527527 $title = wfMsgExt( 'contest-email-reminder-title', 'parsemag', $params['daysLeft'] );
528528 $user = $this->getUser();
529 - $sender = $wgPasswordSender;
530 - $senderName = $wgPasswordSenderName;
 529+ $sender = $wgContestMailSender;
 530+ $senderName = $wgContestMailSenderName;
531531
532532 wfRunHooks( 'ContestBeforeReminderEmail', array( &$this, &$title, &$emailText, &$user, &$sender, &$senderName ) );
533533

Follow-up revisions

RevisionCommit summaryAuthorDate
r1002961.18wmf1 MFT r100292, r100287reedy23:40, 19 October 2011

Status & tagging log