r63575 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63574‎ | r63575 | r63576 >
Date:21:06, 10 March 2010
Author:catrope
Status:deferred
Tags:
Comment:
wmf-deployment: Merge r63310, r63554 (IP address in e-mail feature for ContactPage) from trunk
Modified paths:
  • /branches/wmf-deployment/extensions/ContactPage (modified) (history)
  • /branches/wmf-deployment/extensions/ContactPage/ContactPage.i18n.php (modified) (history)
  • /branches/wmf-deployment/extensions/ContactPage/ContactPage.php (modified) (history)
  • /branches/wmf-deployment/extensions/ContactPage/SpecialContact.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/ContactPage/SpecialContact.php
@@ -265,6 +265,7 @@
266266
267267 $csender = $wgContactSender ? $wgContactSender : $wgEmergencyContact;
268268 $cname = $wgContactSenderName;
 269+ $senderIP = wfGetIP();
269270
270271 wfDebug( __METHOD__ . ": start\n" );
271272
@@ -288,9 +289,19 @@
289290 }
290291
291292 if ( $this->fromname !== '' ) {
292 - $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $this->fromname );
 293+ if ( $wgContactIncludeIP ) {
 294+ $subject = wfMsgForContent( 'contactpage-subject-and-sender-withip', $subject, $this->fromname, $senderIP );
 295+ } else {
 296+ $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $this->fromname );
 297+ }
293298 } else if ( $this->fromaddress !== '' ) {
294 - $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $this->fromaddress );
 299+ if ( $wgContactIncludeIP ) {
 300+ $subject = wfMsgForContent( 'contactpage-subject-and-sender-withip', $subject, $this->fromaddress, $senderIP );
 301+ } else {
 302+ $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $this->fromaddress );
 303+ }
 304+ } else if ( $wgContactIncludeIP ) {
 305+ $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $senderIP );
295306 }
296307
297308 if( !wfRunHooks( 'ContactForm', array( &$targetAddress, &$replyto, &$subject, &$this->text ) ) ) {
Index: branches/wmf-deployment/extensions/ContactPage/ContactPage.i18n.php
@@ -23,6 +23,7 @@
2424 'contactpage-legend' => 'Send e-mail',
2525 'contactpage-defsubject' => 'Contact message',
2626 'contactpage-subject-and-sender' => '$1 (from $2)',
 27+ 'contactpage-subject-and-sender-withip' => '$1 (from $2 at $3)',
2728 'contactpage-fromname' => 'Your name: *',
2829 'contactpage-fromaddress' => 'Your e-mail: **',
2930 'contactpage-formfootnotes' => '* optional<br />
@@ -48,7 +49,9 @@
4950 'contactpage-desc' => 'Extension description displayed on [[Special:Version]].',
5051 'contactpage-title' => '{{Identical|Contact}}',
5152 'contactpage-legend' => '{{Identical|E-mail}}',
52 - 'contactpage-defsubject' => '{{Identical|Contact}}',
 53+ 'contactpage-defsubject' => 'Default subject for sent e-mail. {{Identical|Contact}}',
 54+ 'contactpage-subject-and-sender' => 'Subject with sender included. $1 is the original subject, $2 is a user name, e-mail address or IP address.',
 55+ 'contactpage-subject-and-sender-withip' => 'Subject with sender and IP included. $1 is the original subject, $2 is a user name or e-mail address, $3 is an IP address.',
5356 'contactpage-fromaddress' => '{{Identical|E-mail}}',
5457 'contactpage-fromaddress-required' => '{{Identical|E-mail}}',
5558 );
@@ -1218,6 +1221,7 @@
12191222 'contactpage-legend' => 'E-mail versturen',
12201223 'contactpage-defsubject' => 'Contactbericht',
12211224 'contactpage-subject-and-sender' => '$1 (van $2)',
 1225+ 'contactpage-subject-and-sender-withip' => '$1 (van $2 op $3)',
12221226 'contactpage-fromname' => 'Uw naam:*',
12231227 'contactpage-fromaddress' => 'Uw e-mailadres:**',
12241228 'contactpage-formfootnotes' => '* optioneel<br />
Index: branches/wmf-deployment/extensions/ContactPage/ContactPage.php
@@ -36,3 +36,6 @@
3737 $wgContactSenderName = 'Contact Form on ' . $wgSitename;
3838
3939 $wgContactRequireAll = false;
 40+
 41+// If true, the IP address of the submitter will be put in the subject line
 42+$wgContactIncludeIP = false;
Property changes on: branches/wmf-deployment/extensions/ContactPage
___________________________________________________________________
Modified: svn:mergeinfo
4043 Merged /trunk/extensions/ContactPage:r63310,63554

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r63310ContactPage: (bug 22741) Add IP address of sender to subject linecatrope14:00, 6 March 2010
r63554ContactPage: Followup to r63310: make the IP-in-the-subject line feature opti...catrope17:01, 10 March 2010

Status & tagging log