Index: trunk/extensions/CheckUser/CheckUser_body.php |
— | — | @@ -92,6 +92,8 @@ |
93 | 93 | if( $wgRequest->wasPosted() ) { |
94 | 94 | if( $wgRequest->getVal('action') === 'block' ) { |
95 | 95 | $this->doMassUserBlock( $users, $blockreason, $tag, $talkTag ); |
| 96 | + } else if( !$this->checkReason($reason) ) { |
| 97 | + $wgOut->addWikiText( wfMsgExt('checkuser-noreason',array('parsemag')) ); |
96 | 98 | } else if( $checktype=='subuserips' ) { |
97 | 99 | $this->doUserIPsRequest( $name, $reason, $period ); |
98 | 100 | } else if( $xff && $checktype=='subipedits' ) { |
— | — | @@ -288,6 +290,11 @@ |
289 | 291 | } |
290 | 292 | return wfMsgExt('checkuser-nomatch','parse'); |
291 | 293 | } |
| 294 | + |
| 295 | + protected function checkReason( $reason ) { |
| 296 | + global $wgCheckUserForceSummary; |
| 297 | + return ( !$wgCheckUserForceSummary || strlen($reason) ); |
| 298 | + } |
292 | 299 | |
293 | 300 | /** |
294 | 301 | * @param string $ip |
— | — | @@ -318,12 +325,7 @@ |
319 | 326 | $wgOut->addHTML( $s ); |
320 | 327 | return; |
321 | 328 | } |
322 | | - |
323 | | - # Demand that a reason be given |
324 | | - if( !$reason ) { |
325 | | - $wgOut->addWikiText( wfMsgExt('checkuser-noreason',array('parsemag')) ); |
326 | | - return; |
327 | | - } |
| 329 | + |
328 | 330 | # Record check... |
329 | 331 | if( !$this->addLogEntry( 'userips', 'user', $user, $reason, $user_id ) ) { |
330 | 332 | $wgOut->addHTML( '<p>'.wfMsgHtml('checkuser-log-fail').'</p>' ); |
— | — | @@ -445,11 +447,6 @@ |
446 | 448 | if( $xfor ) { |
447 | 449 | $logType .= '-xff'; |
448 | 450 | } |
449 | | - # Demand that a reason be given |
450 | | - if( !$reason ) { |
451 | | - $wgOut->addWikiText( wfMsgExt('checkuser-noreason',array('parsemag')) ); |
452 | | - return; |
453 | | - } |
454 | 451 | # Record check... |
455 | 452 | if( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) { |
456 | 453 | $wgOut->addWikiMsg( 'checkuser-log-fail' ); |
— | — | @@ -594,11 +591,6 @@ |
595 | 592 | return; |
596 | 593 | } |
597 | 594 | |
598 | | - # Demand that a reason be given |
599 | | - if( !$reason ) { |
600 | | - $wgOut->addWikiText( wfMsgExt('checkuser-noreason',array('parsemag')) ); |
601 | | - return; |
602 | | - } |
603 | 595 | # Record check... |
604 | 596 | if( !$this->addLogEntry( 'useredits', 'user', $user, $reason, $user_id ) ) { |
605 | 597 | $wgOut->addHTML( '<p>'.wfMsgHtml('checkuser-log-fail').'</p>' ); |
— | — | @@ -717,11 +709,6 @@ |
718 | 710 | if( $xfor ) { |
719 | 711 | $logType .= '-xff'; |
720 | 712 | } |
721 | | - # Demand that a reason be given |
722 | | - if( !$reason ) { |
723 | | - $wgOut->addWikiText( wfMsgExt('checkuser-noreason',array('parsemag')) ); |
724 | | - return; |
725 | | - } |
726 | 713 | # Log the check... |
727 | 714 | if( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) { |
728 | 715 | $wgOut->addHTML( '<p>'.wfMsgHtml('checkuser-log-fail').'</p>' ); |
Index: trunk/extensions/CheckUser/CheckUser.php |
— | — | @@ -33,6 +33,8 @@ |
34 | 34 | # Mass block limits |
35 | 35 | $wgCheckUserMaxBlocks = 200; |
36 | 36 | |
| 37 | +$wgCheckUserForceSummary = false; |
| 38 | + |
37 | 39 | $wgCheckUserStyleVersion = 4; |
38 | 40 | |
39 | 41 | # Recent changes data hook |