Index: branches/wmf-deployment/extensions/ContactPage/SpecialContact.php |
— | — | @@ -265,6 +265,7 @@ |
266 | 266 | |
267 | 267 | $csender = $wgContactSender ? $wgContactSender : $wgEmergencyContact; |
268 | 268 | $cname = $wgContactSenderName; |
| 269 | + $senderIP = wfGetIP(); |
269 | 270 | |
270 | 271 | wfDebug( __METHOD__ . ": start\n" ); |
271 | 272 | |
— | — | @@ -288,9 +289,19 @@ |
289 | 290 | } |
290 | 291 | |
291 | 292 | 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 | + } |
293 | 298 | } 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 ); |
295 | 306 | } |
296 | 307 | |
297 | 308 | if( !wfRunHooks( 'ContactForm', array( &$targetAddress, &$replyto, &$subject, &$this->text ) ) ) { |
Index: branches/wmf-deployment/extensions/ContactPage/ContactPage.i18n.php |
— | — | @@ -23,6 +23,7 @@ |
24 | 24 | 'contactpage-legend' => 'Send e-mail', |
25 | 25 | 'contactpage-defsubject' => 'Contact message', |
26 | 26 | 'contactpage-subject-and-sender' => '$1 (from $2)', |
| 27 | + 'contactpage-subject-and-sender-withip' => '$1 (from $2 at $3)', |
27 | 28 | 'contactpage-fromname' => 'Your name: *', |
28 | 29 | 'contactpage-fromaddress' => 'Your e-mail: **', |
29 | 30 | 'contactpage-formfootnotes' => '* optional<br /> |
— | — | @@ -48,7 +49,9 @@ |
49 | 50 | 'contactpage-desc' => 'Extension description displayed on [[Special:Version]].', |
50 | 51 | 'contactpage-title' => '{{Identical|Contact}}', |
51 | 52 | '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.', |
53 | 56 | 'contactpage-fromaddress' => '{{Identical|E-mail}}', |
54 | 57 | 'contactpage-fromaddress-required' => '{{Identical|E-mail}}', |
55 | 58 | ); |
— | — | @@ -1218,6 +1221,7 @@ |
1219 | 1222 | 'contactpage-legend' => 'E-mail versturen', |
1220 | 1223 | 'contactpage-defsubject' => 'Contactbericht', |
1221 | 1224 | 'contactpage-subject-and-sender' => '$1 (van $2)', |
| 1225 | + 'contactpage-subject-and-sender-withip' => '$1 (van $2 op $3)', |
1222 | 1226 | 'contactpage-fromname' => 'Uw naam:*', |
1223 | 1227 | 'contactpage-fromaddress' => 'Uw e-mailadres:**', |
1224 | 1228 | 'contactpage-formfootnotes' => '* optioneel<br /> |
Index: branches/wmf-deployment/extensions/ContactPage/ContactPage.php |
— | — | @@ -36,3 +36,6 @@ |
37 | 37 | $wgContactSenderName = 'Contact Form on ' . $wgSitename; |
38 | 38 | |
39 | 39 | $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 |
40 | 43 | Merged /trunk/extensions/ContactPage:r63310,63554 |