Index: trunk/extensions/CheckUser/CheckUser_body.php |
— | — | @@ -415,7 +415,7 @@ |
416 | 416 | } |
417 | 417 | |
418 | 418 | # Record check... |
419 | | - if ( !$this->addLogEntry( 'userips', 'user', $user, $reason, $user_id ) ) { |
| 419 | + if ( !self::addLogEntry( 'userips', 'user', $user, $reason, $user_id ) ) { |
420 | 420 | // FIXME: addWikiMsg |
421 | 421 | $wgOut->addHTML( '<p>' . wfMsgHtml( 'checkuser-log-fail' ) . '</p>' ); |
422 | 422 | } |
— | — | @@ -552,7 +552,7 @@ |
553 | 553 | global $wgOut, $wgLang; |
554 | 554 | $dbr = wfGetDB( DB_SLAVE ); |
555 | 555 | # Invalid IPs are passed in as a blank string |
556 | | - $ip_conds = $this->getIpConds( $dbr, $ip, $xfor ); |
| 556 | + $ip_conds = self::getIpConds( $dbr, $ip, $xfor ); |
557 | 557 | if ( !$ip || $ip_conds === false ) { |
558 | 558 | $wgOut->addWikiMsg( 'badipaddress' ); |
559 | 559 | return; |
— | — | @@ -563,7 +563,7 @@ |
564 | 564 | $logType .= '-xff'; |
565 | 565 | } |
566 | 566 | # Record check... |
567 | | - if ( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) { |
| 567 | + if ( !self::addLogEntry( $logType, 'ip', $ip, $reason ) ) { |
568 | 568 | $wgOut->addWikiMsg( 'checkuser-log-fail' ); |
569 | 569 | } |
570 | 570 | |
— | — | @@ -722,7 +722,7 @@ |
723 | 723 | } |
724 | 724 | |
725 | 725 | # Record check... |
726 | | - if ( !$this->addLogEntry( 'useredits', 'user', $user, $reason, $user_id ) ) { |
| 726 | + if ( !self::addLogEntry( 'useredits', 'user', $user, $reason, $user_id ) ) { |
727 | 727 | $wgOut->addHTML( '<p>' . wfMsgHtml( 'checkuser-log-fail' ) . '</p>' ); |
728 | 728 | } |
729 | 729 | |
— | — | @@ -841,7 +841,7 @@ |
842 | 842 | global $wgUser, $wgOut, $wgLang; |
843 | 843 | $dbr = wfGetDB( DB_SLAVE ); |
844 | 844 | # Invalid IPs are passed in as a blank string |
845 | | - $ip_conds = $this->getIpConds( $dbr, $ip, $xfor ); |
| 845 | + $ip_conds = self::getIpConds( $dbr, $ip, $xfor ); |
846 | 846 | if ( !$ip || $ip_conds === false ) { |
847 | 847 | $wgOut->addWikiMsg( 'badipaddress' ); |
848 | 848 | return; |
— | — | @@ -852,7 +852,7 @@ |
853 | 853 | $logType .= '-xff'; |
854 | 854 | } |
855 | 855 | # Log the check... |
856 | | - if ( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) { |
| 856 | + if ( !self::addLogEntry( $logType, 'ip', $ip, $reason ) ) { |
857 | 857 | $wgOut->addHTML( '<p>' . wfMsgHtml( 'checkuser-log-fail' ) . '</p>' ); |
858 | 858 | } |
859 | 859 | |
— | — | @@ -1281,7 +1281,7 @@ |
1282 | 1282 | /** |
1283 | 1283 | * @param Database $db |
1284 | 1284 | * @param string $ip |
1285 | | - * @param string $xfor |
| 1285 | + * @param string|bool $xfor |
1286 | 1286 | * @return mixed array/false conditions |
1287 | 1287 | */ |
1288 | 1288 | public static function getIpConds( $db, $ip, $xfor = false ) { |
Index: trunk/extensions/CheckUser/CheckUser.i18n.php |
— | — | @@ -27,7 +27,7 @@ |
28 | 28 | 'right-checkuser-log' => 'View the checkuser log', |
29 | 29 | 'grouppage-checkuser' => '{{ns:project}}:Check user', |
30 | 30 | 'checkuser-reason' => 'Reason:', |
31 | | - 'checkuser-reason-api' => 'API:', |
| 31 | + 'checkuser-reason-api' => 'API: $1', |
32 | 32 | 'checkuser-showlog' => 'Show log', |
33 | 33 | 'checkuser-log' => 'CheckUser log', |
34 | 34 | 'checkuser-query' => 'Query recent changes', |
— | — | @@ -137,7 +137,9 @@ |
138 | 138 | 'checkuser-reason' => "Field name on CheckUser Special page. See screenshot '[http://www.mediawiki.org/wiki/Extension:CheckUser#Basic_interface Basic CheckUser interface]'. |
139 | 139 | |
140 | 140 | {{Identical|Reason}}", |
141 | | - 'checkuser-reason-api' => 'Prefixes check user query reasons that are made through the API', |
| 141 | + 'checkuser-reason-api' => 'Prefixes check user query reasons that are made through the API |
| 142 | + |
| 143 | +* $1 = User specified reason', |
142 | 144 | 'checkuser-showlog' => "Label for link on CheckUser Special page. See screenshot '[http://www.mediawiki.org/wiki/Extension:CheckUser#Basic_interface Basic CheckUser interface]'.", |
143 | 145 | 'checkuser-query' => "Fieldset label. See [http://www.mediawiki.org/wiki/Extension:CheckUser#Basic_interface screenshot titled 'Basic CheckUser interface'].", |
144 | 146 | 'checkuser-target' => '{{Identical|IP address or username}}', |
Index: trunk/extensions/CheckUser/api/ApiQueryCheckUser.php |
— | — | @@ -24,7 +24,7 @@ |
25 | 25 | |
26 | 26 | $limit = $params['limit']; |
27 | 27 | $target = $params['target']; |
28 | | - $reason = wfMsgForContent( 'checkuser-reason-api' ) . ' ' . $params['reason']; |
| 28 | + $reason = wfMsgForContent( 'checkuser-reason-api', $params['reason'] ); |
29 | 29 | $time = wfTimestamp( TS_MW, |
30 | 30 | strtotime( 'now' ) - ( strtotime( $params['timecond'] ? $params['timecond'] : '2 weeks' ) - strtotime( 'now' |
31 | 31 | ) ) |