r63554 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63553‎ | r63554 | r63555 >
Date:17:01, 10 March 2010
Author:catrope
Status:ok
Tags:
Comment:
ContactPage: Followup to r63310: make the IP-in-the-subject line feature optional
Modified paths:
  • /trunk/extensions/ContactPage/ContactPage.php (modified) (history)
  • /trunk/extensions/ContactPage/SpecialContact.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContactPage/SpecialContact.php
@@ -320,10 +320,18 @@
321321 }
322322
323323 if ( $this->fromname !== '' ) {
324 - $subject = wfMsgForContent( 'contactpage-subject-and-sender-withip', $subject, $this->fromname, $senderIP );
 324+ if ( $wgContactIncludeIP ) {
 325+ $subject = wfMsgForContent( 'contactpage-subject-and-sender-withip', $subject, $this->fromname, $senderIP );
 326+ } else {
 327+ $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $this->fromname );
 328+ }
325329 } elseif ( $this->fromaddress !== '' ) {
326 - $subject = wfMsgForContent( 'contactpage-subject-and-sender-withip', $subject, $this->fromaddress, $senderIP );
327 - } else {
 330+ if ( $wgContactIncludeIP ) {
 331+ $subject = wfMsgForContent( 'contactpage-subject-and-sender-withip', $subject, $this->fromaddress, $senderIP );
 332+ } else {
 333+ $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $this->fromaddress );
 334+ }
 335+ } else if ( $wgContactIncludeIP ) {
328336 $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $senderIP );
329337 }
330338
Index: trunk/extensions/ContactPage/ContactPage.php
@@ -46,3 +46,6 @@
4747 // If true, users will be required to supply a name and an e-mail address
4848 // on Special:Contact.
4949 $wgContactRequireAll = false;
 50+
 51+// If true, the IP address of the submitter will be put in the subject line
 52+$wgContactIncludeIP = false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r63575wmf-deployment: Merge r63310, r63554 (IP address in e-mail feature for Contac...catrope21:06, 10 March 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63310ContactPage: (bug 22741) Add IP address of sender to subject linecatrope14:00, 6 March 2010

Status & tagging log