Index: trunk/extensions/ContactPage/SpecialContact.php |
— | — | @@ -230,11 +230,11 @@ |
231 | 231 | Xml::textarea( 'wpText', $this->text, 80, 20, array( 'id' => 'wpText' ) ) . |
232 | 232 | '</td> |
233 | 233 | </tr>'; |
234 | | - if ( $wgContactIncludeIP ) { |
| 234 | + if ( $wgContactIncludeIP && $wgUser->isLoggedIn() ) { |
235 | 235 | $form .= '<tr> |
236 | 236 | <td></td> |
237 | 237 | <td class="mw-input">' . |
238 | | - Xml::checkLabel( wfMsg( 'contactpage-includeip' ), 'wpIncludeIP', 'wpIncludeIP', $wgUser->isAnon() ) . |
| 238 | + Xml::checkLabel( wfMsg( 'contactpage-includeip' ), 'wpIncludeIP', 'wpIncludeIP', false ) . |
239 | 239 | '</td> |
240 | 240 | </tr>'; |
241 | 241 | } |
— | — | @@ -300,7 +300,7 @@ |
301 | 301 | } |
302 | 302 | |
303 | 303 | function doSubmit() { |
304 | | - global $wgOut; |
| 304 | + global $wgOut, $wgUser; |
305 | 305 | global $wgEnableEmail, $wgUserEmailUseReplyTo, $wgEmergencyContact; |
306 | 306 | global $wgContactUser, $wgContactSender, $wgContactSenderName, $wgContactIncludeIP; |
307 | 307 | |
— | — | @@ -329,7 +329,7 @@ |
330 | 330 | $subject = wfMsgForContent( 'contactpage-defsubject' ); |
331 | 331 | } |
332 | 332 | |
333 | | - $includeIP = $wgContactIncludeIP && $this->includeIP; |
| 333 | + $includeIP = $wgContactIncludeIP && ( $this->includeIP || $wgUser->isAnon() ); |
334 | 334 | if ( $this->fromname !== '' ) { |
335 | 335 | if ( $includeIP ) { |
336 | 336 | $subject = wfMsgForContent( 'contactpage-subject-and-sender-withip', $subject, $this->fromname, $senderIP ); |