r73183 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73182‎ | r73183 | r73184 >
Date:23:50, 16 September 2010
Author:nad
Status:deferred
Tags:
Comment:
use $wgEmergencyContact for fallback email address to use in From field
Modified paths:
  • /trunk/extensions/EmailPage/EmailPage.php (modified) (history)
  • /trunk/extensions/EmailPage/EmailPage_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EmailPage/EmailPage_body.php
@@ -162,7 +162,7 @@
163163 * Send the message to the recipients (or just list them if arg = false)
164164 */
165165 function send( $send = true ) {
166 - global $wgOut, $wgUser, $wgParser, $wgServer, $wgScript, $wgArticlePath, $wgScriptPath,
 166+ global $wgOut, $wgUser, $wgParser, $wgServer, $wgScript, $wgArticlePath, $wgScriptPath, $wgEmergencyContact,
167167 $wgEmailPageCss, $wgEmailPageGroup, $wgEmailPageAllowRemoteAddr, $wgEmailPageAllowAllUsers;
168168
169169 # Set error and bail if user not in postmaster group, and request not from trusted address
@@ -239,7 +239,7 @@
240240 # Set up new mailer instance if sending
241241 if ( $send ) {
242242 $mail = new PHPMailer();
243 - $mail->From = $wgUser->isValidEmailAddr( $wgUser->getEmail() ) ? $wgUser->getEmail() : "wiki@$wgServer";
 243+ $mail->From = $wgUser->isValidEmailAddr( $wgUser->getEmail() ) ? $wgUser->getEmail() : $wgEmergencyContact;
244244 $mail->FromName = User::whoIsReal( $wgUser->getId() );
245245 $mail->Subject = $this->subject;
246246 $mail->Body = $message;
Index: trunk/extensions/EmailPage/EmailPage.php
@@ -13,7 +13,7 @@
1414
1515 if ( !defined( 'MEDIAWIKI' ) ) die( 'Not an entry point.' );
1616
17 -define( 'EMAILPAGE_VERSION', '1.3.4, 2009-05-04' );
 17+define( 'EMAILPAGE_VERSION', '1.3.5, 2010-09-17' );
1818
1919 $wgEmailPageGroup = 'sysop'; # Users must belong to this group to send emails (empty string means anyone can send)
2020 $wgEmailPageContactsCat = ''; # This specifies the name of a category containing categories of contact pages

Status & tagging log