Index: trunk/extensions/ContactPage/SpecialContact.php |
— | — | @@ -296,6 +296,7 @@ |
297 | 297 | |
298 | 298 | $csender = $wgContactSender ? $wgContactSender : $wgEmergencyContact; |
299 | 299 | $cname = $wgContactSenderName; |
| 300 | + $senderIP = wfGetIP(); |
300 | 301 | |
301 | 302 | wfDebug( __METHOD__ . ": start\n" ); |
302 | 303 | |
— | — | @@ -319,9 +320,11 @@ |
320 | 321 | } |
321 | 322 | |
322 | 323 | if ( $this->fromname !== '' ) { |
323 | | - $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $this->fromname ); |
| 324 | + $subject = wfMsgForContent( 'contactpage-subject-and-sender-withip', $subject, $this->fromname, $senderIP ); |
324 | 325 | } elseif ( $this->fromaddress !== '' ) { |
325 | | - $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $this->fromaddress ); |
| 326 | + $subject = wfMsgForContent( 'contactpage-subject-and-sender-withip', $subject, $this->fromaddress, $senderIP ); |
| 327 | + } else { |
| 328 | + $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $senderIP ); |
326 | 329 | } |
327 | 330 | |
328 | 331 | if( !wfRunHooks( 'ContactForm', array( &$targetAddress, &$replyto, &$subject, &$this->text ) ) ) { |
Index: trunk/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 | ); |
— | — | @@ -1311,6 +1314,7 @@ |
1312 | 1315 | 'contactpage-legend' => 'E-mail versturen', |
1313 | 1316 | 'contactpage-defsubject' => 'Contactbericht', |
1314 | 1317 | 'contactpage-subject-and-sender' => '$1 (van $2)', |
| 1318 | + 'contactpage-subject-and-sender-withip' => '$1 (van $2 op $3)', |
1315 | 1319 | 'contactpage-fromname' => 'Uw naam:*', |
1316 | 1320 | 'contactpage-fromaddress' => 'Uw e-mailadres:**', |
1317 | 1321 | 'contactpage-formfootnotes' => '* optioneel<br /> |