r100189 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100188‎ | r100189 | r100190 >
Date:23:56, 18 October 2011
Author:johnduhart
Status:ok
Tags:
Comment:
Follow up r100165:

i18n changes per CR
Changed $this-> to self:: where the function type was changed
Modified paths:
  • /trunk/extensions/CheckUser/CheckUser.i18n.php (modified) (history)
  • /trunk/extensions/CheckUser/CheckUser_body.php (modified) (history)
  • /trunk/extensions/CheckUser/api/ApiQueryCheckUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/CheckUser_body.php
@@ -415,7 +415,7 @@
416416 }
417417
418418 # Record check...
419 - if ( !$this->addLogEntry( 'userips', 'user', $user, $reason, $user_id ) ) {
 419+ if ( !self::addLogEntry( 'userips', 'user', $user, $reason, $user_id ) ) {
420420 // FIXME: addWikiMsg
421421 $wgOut->addHTML( '<p>' . wfMsgHtml( 'checkuser-log-fail' ) . '</p>' );
422422 }
@@ -552,7 +552,7 @@
553553 global $wgOut, $wgLang;
554554 $dbr = wfGetDB( DB_SLAVE );
555555 # 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 );
557557 if ( !$ip || $ip_conds === false ) {
558558 $wgOut->addWikiMsg( 'badipaddress' );
559559 return;
@@ -563,7 +563,7 @@
564564 $logType .= '-xff';
565565 }
566566 # Record check...
567 - if ( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) {
 567+ if ( !self::addLogEntry( $logType, 'ip', $ip, $reason ) ) {
568568 $wgOut->addWikiMsg( 'checkuser-log-fail' );
569569 }
570570
@@ -722,7 +722,7 @@
723723 }
724724
725725 # Record check...
726 - if ( !$this->addLogEntry( 'useredits', 'user', $user, $reason, $user_id ) ) {
 726+ if ( !self::addLogEntry( 'useredits', 'user', $user, $reason, $user_id ) ) {
727727 $wgOut->addHTML( '<p>' . wfMsgHtml( 'checkuser-log-fail' ) . '</p>' );
728728 }
729729
@@ -841,7 +841,7 @@
842842 global $wgUser, $wgOut, $wgLang;
843843 $dbr = wfGetDB( DB_SLAVE );
844844 # 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 );
846846 if ( !$ip || $ip_conds === false ) {
847847 $wgOut->addWikiMsg( 'badipaddress' );
848848 return;
@@ -852,7 +852,7 @@
853853 $logType .= '-xff';
854854 }
855855 # Log the check...
856 - if ( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) {
 856+ if ( !self::addLogEntry( $logType, 'ip', $ip, $reason ) ) {
857857 $wgOut->addHTML( '<p>' . wfMsgHtml( 'checkuser-log-fail' ) . '</p>' );
858858 }
859859
@@ -1281,7 +1281,7 @@
12821282 /**
12831283 * @param Database $db
12841284 * @param string $ip
1285 - * @param string $xfor
 1285+ * @param string|bool $xfor
12861286 * @return mixed array/false conditions
12871287 */
12881288 public static function getIpConds( $db, $ip, $xfor = false ) {
Index: trunk/extensions/CheckUser/CheckUser.i18n.php
@@ -27,7 +27,7 @@
2828 'right-checkuser-log' => 'View the checkuser log',
2929 'grouppage-checkuser' => '{{ns:project}}:Check user',
3030 'checkuser-reason' => 'Reason:',
31 - 'checkuser-reason-api' => 'API:',
 31+ 'checkuser-reason-api' => 'API: $1',
3232 'checkuser-showlog' => 'Show log',
3333 'checkuser-log' => 'CheckUser log',
3434 'checkuser-query' => 'Query recent changes',
@@ -137,7 +137,9 @@
138138 'checkuser-reason' => "Field name on CheckUser Special page. See screenshot '[http://www.mediawiki.org/wiki/Extension:CheckUser#Basic_interface Basic CheckUser interface]'.
139139
140140 {{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',
142144 'checkuser-showlog' => "Label for link on CheckUser Special page. See screenshot '[http://www.mediawiki.org/wiki/Extension:CheckUser#Basic_interface Basic CheckUser interface]'.",
143145 'checkuser-query' => "Fieldset label. See [http://www.mediawiki.org/wiki/Extension:CheckUser#Basic_interface screenshot titled 'Basic CheckUser interface'].",
144146 'checkuser-target' => '{{Identical|IP address or username}}',
Index: trunk/extensions/CheckUser/api/ApiQueryCheckUser.php
@@ -24,7 +24,7 @@
2525
2626 $limit = $params['limit'];
2727 $target = $params['target'];
28 - $reason = wfMsgForContent( 'checkuser-reason-api' ) . ' ' . $params['reason'];
 28+ $reason = wfMsgForContent( 'checkuser-reason-api', $params['reason'] );
2929 $time = wfTimestamp( TS_MW,
3030 strtotime( 'now' ) - ( strtotime( $params['timecond'] ? $params['timecond'] : '2 weeks' ) - strtotime( 'now'
3131 ) )

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100165Adds API Module by cryptocoryne...johnduhart21:37, 18 October 2011

Status & tagging log