Index: trunk/extensions/CheckUser/CheckUser_body.php |
— | — | @@ -245,7 +245,8 @@ |
246 | 246 | if( !empty( $safeUsers ) ) { |
247 | 247 | $n = count( $safeUsers ); |
248 | 248 | $ulist = $wgLang->listToText( $safeUsers ); |
249 | | - $wgOut->addWikiText( wfMsgExt( 'checkuser-block-success', 'parsemag', $ulist, $wgLang->formatNum( $n ) ) ); |
| 249 | + $wgOut->addWikiText( wfMsgExt( 'checkuser-block-success', 'parsemag', |
| 250 | + $ulist, $wgLang->formatNum( $n ) ) ); |
250 | 251 | } else { |
251 | 252 | $wgOut->addWikiText( wfMsgExt( 'checkuser-block-failure', 'parsemag' ) ); |
252 | 253 | } |
— | — | @@ -317,7 +318,13 @@ |
318 | 319 | $wgOut->addHTML( $s ); |
319 | 320 | return; |
320 | 321 | } |
321 | | - |
| 322 | + |
| 323 | + # Demand that a reason be given |
| 324 | + if( !$reason ) { |
| 325 | + $wgOut->addWikiText( wfMsgExt('checkuser-noreason',array('parsemag')) ); |
| 326 | + return; |
| 327 | + } |
| 328 | + # Record check... |
322 | 329 | if( !$this->addLogEntry( 'userips', 'user', $user, $reason, $user_id ) ) { |
323 | 330 | $wgOut->addHTML( '<p>'.wfMsgHtml('checkuser-log-fail').'</p>' ); |
324 | 331 | } |
— | — | @@ -438,6 +445,11 @@ |
439 | 446 | if( $xfor ) { |
440 | 447 | $logType .= '-xff'; |
441 | 448 | } |
| 449 | + # Demand that a reason be given |
| 450 | + if( !$reason ) { |
| 451 | + $wgOut->addWikiText( wfMsgExt('checkuser-noreason',array('parsemag')) ); |
| 452 | + return; |
| 453 | + } |
442 | 454 | # Record check... |
443 | 455 | if( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) { |
444 | 456 | $wgOut->addWikiMsg( 'checkuser-log-fail' ); |
— | — | @@ -582,6 +594,11 @@ |
583 | 595 | return; |
584 | 596 | } |
585 | 597 | |
| 598 | + # Demand that a reason be given |
| 599 | + if( !$reason ) { |
| 600 | + $wgOut->addWikiText( wfMsgExt('checkuser-noreason',array('parsemag')) ); |
| 601 | + return; |
| 602 | + } |
586 | 603 | # Record check... |
587 | 604 | if( !$this->addLogEntry( 'useredits', 'user', $user, $reason, $user_id ) ) { |
588 | 605 | $wgOut->addHTML( '<p>'.wfMsgHtml('checkuser-log-fail').'</p>' ); |
— | — | @@ -700,6 +717,11 @@ |
701 | 718 | if( $xfor ) { |
702 | 719 | $logType .= '-xff'; |
703 | 720 | } |
| 721 | + # Demand that a reason be given |
| 722 | + if( !$reason ) { |
| 723 | + $wgOut->addWikiText( wfMsgExt('checkuser-noreason',array('parsemag')) ); |
| 724 | + return; |
| 725 | + } |
704 | 726 | # Log the check... |
705 | 727 | if( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) { |
706 | 728 | $wgOut->addHTML( '<p>'.wfMsgHtml('checkuser-log-fail').'</p>' ); |
Index: trunk/extensions/CheckUser/CheckUser.i18n.php |
— | — | @@ -60,6 +60,7 @@ |
61 | 61 | 'checkuser-block-failure' => '\'\'\'No users blocked.\'\'\'', |
62 | 62 | 'checkuser-block-limit' => 'Too many users selected.', |
63 | 63 | 'checkuser-block-noreason' => 'You must give a reason for the blocks.', |
| 64 | + 'checkuser-noreason' => 'You must give a reason for this query.', |
64 | 65 | 'checkuser-accounts' => '$1 new {{PLURAL:$1|account|accounts}}', |
65 | 66 | 'checkuser-too-many' => 'Too many results, please narrow down the CIDR. |
66 | 67 | Here are the IPs used (5000 max, sorted by address):', |