Index: trunk/extensions/ContactPage/SpecialContact.php |
— | — | @@ -320,10 +320,18 @@ |
321 | 321 | } |
322 | 322 | |
323 | 323 | 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 | + } |
325 | 329 | } 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 ) { |
328 | 336 | $subject = wfMsgForContent( 'contactpage-subject-and-sender', $subject, $senderIP ); |
329 | 337 | } |
330 | 338 | |
Index: trunk/extensions/ContactPage/ContactPage.php |
— | — | @@ -46,3 +46,6 @@ |
47 | 47 | // If true, users will be required to supply a name and an e-mail address |
48 | 48 | // on Special:Contact. |
49 | 49 | $wgContactRequireAll = false; |
| 50 | + |
| 51 | +// If true, the IP address of the submitter will be put in the subject line |
| 52 | +$wgContactIncludeIP = false; |