http://www.mediawiki.org/wiki/Special:Code/MediaWiki/100189

Revision: 100189
Author:   johnduhart
Date:     2011-10-18 23:56:32 +0000 (Tue, 18 Oct 2011)
Log Message:
-----------
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
    trunk/extensions/CheckUser/CheckUser_body.php
    trunk/extensions/CheckUser/api/ApiQueryCheckUser.php

Modified: trunk/extensions/CheckUser/CheckUser.i18n.php
===================================================================
--- trunk/extensions/CheckUser/CheckUser.i18n.php       2011-10-18 23:48:09 UTC 
(rev 100188)
+++ trunk/extensions/CheckUser/CheckUser.i18n.php       2011-10-18 23:56:32 UTC 
(rev 100189)
@@ -27,7 +27,7 @@
        'right-checkuser-log'        => 'View the checkuser log',
        'grouppage-checkuser'        => '{{ns:project}}:Check user',
        'checkuser-reason'           => 'Reason:',
-       'checkuser-reason-api'       => 'API:',
+       'checkuser-reason-api'       => 'API: $1',
        'checkuser-showlog'          => 'Show log',
        'checkuser-log'              => 'CheckUser log',
        'checkuser-query'            => 'Query recent changes',
@@ -137,7 +137,9 @@
        'checkuser-reason' => "Field name on CheckUser Special page. See 
screenshot '[http://www.mediawiki.org/wiki/Extension:CheckUser#Basic_interface 
Basic CheckUser interface]'.
 
 {{Identical|Reason}}",
-       'checkuser-reason-api' => 'Prefixes check user query reasons that are 
made through the API',
+       'checkuser-reason-api' => 'Prefixes check user query reasons that are 
made through the API
+
+* $1 = User specified reason',
        'checkuser-showlog' => "Label for link on CheckUser Special page. See 
screenshot '[http://www.mediawiki.org/wiki/Extension:CheckUser#Basic_interface 
Basic CheckUser interface]'.",
        'checkuser-query' => "Fieldset label. See 
[http://www.mediawiki.org/wiki/Extension:CheckUser#Basic_interface screenshot 
titled 'Basic CheckUser interface'].",
        'checkuser-target' => '{{Identical|IP address or username}}',

Modified: trunk/extensions/CheckUser/CheckUser_body.php
===================================================================
--- trunk/extensions/CheckUser/CheckUser_body.php       2011-10-18 23:48:09 UTC 
(rev 100188)
+++ trunk/extensions/CheckUser/CheckUser_body.php       2011-10-18 23:56:32 UTC 
(rev 100189)
@@ -415,7 +415,7 @@
                }
 
                # Record check...
-               if ( !$this->addLogEntry( 'userips', 'user', $user, $reason, 
$user_id ) ) {
+               if ( !self::addLogEntry( 'userips', 'user', $user, $reason, 
$user_id ) ) {
                        // FIXME: addWikiMsg
                        $wgOut->addHTML( '<p>' . wfMsgHtml( 
'checkuser-log-fail' ) . '</p>' );
                }
@@ -552,7 +552,7 @@
                global $wgOut, $wgLang;
                $dbr = wfGetDB( DB_SLAVE );
                # Invalid IPs are passed in as a blank string
-               $ip_conds = $this->getIpConds( $dbr, $ip, $xfor );
+               $ip_conds = self::getIpConds( $dbr, $ip, $xfor );
                if ( !$ip || $ip_conds === false ) {
                        $wgOut->addWikiMsg( 'badipaddress' );
                        return;
@@ -563,7 +563,7 @@
                        $logType .= '-xff';
                }
                # Record check...
-               if ( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) {
+               if ( !self::addLogEntry( $logType, 'ip', $ip, $reason ) ) {
                        $wgOut->addWikiMsg( 'checkuser-log-fail' );
                }
 
@@ -722,7 +722,7 @@
                }
 
                # Record check...
-               if ( !$this->addLogEntry( 'useredits', 'user', $user, $reason, 
$user_id ) ) {
+               if ( !self::addLogEntry( 'useredits', 'user', $user, $reason, 
$user_id ) ) {
                        $wgOut->addHTML( '<p>' . wfMsgHtml( 
'checkuser-log-fail' ) . '</p>' );
                }
 
@@ -841,7 +841,7 @@
                global $wgUser, $wgOut, $wgLang;
                $dbr = wfGetDB( DB_SLAVE );
                # Invalid IPs are passed in as a blank string
-               $ip_conds = $this->getIpConds( $dbr, $ip, $xfor );
+               $ip_conds = self::getIpConds( $dbr, $ip, $xfor );
                if ( !$ip || $ip_conds === false ) {
                        $wgOut->addWikiMsg( 'badipaddress' );
                        return;
@@ -852,7 +852,7 @@
                        $logType .= '-xff';
                }
                # Log the check...
-               if ( !$this->addLogEntry( $logType, 'ip', $ip, $reason ) ) {
+               if ( !self::addLogEntry( $logType, 'ip', $ip, $reason ) ) {
                        $wgOut->addHTML( '<p>' . wfMsgHtml( 
'checkuser-log-fail' ) . '</p>' );
                }
 
@@ -1281,7 +1281,7 @@
        /**
         * @param Database $db
         * @param string $ip
-        * @param string $xfor
+        * @param string|bool $xfor
         * @return mixed array/false conditions
         */
        public static function getIpConds( $db, $ip, $xfor = false ) {

Modified: trunk/extensions/CheckUser/api/ApiQueryCheckUser.php
===================================================================
--- trunk/extensions/CheckUser/api/ApiQueryCheckUser.php        2011-10-18 
23:48:09 UTC (rev 100188)
+++ trunk/extensions/CheckUser/api/ApiQueryCheckUser.php        2011-10-18 
23:56:32 UTC (rev 100189)
@@ -24,7 +24,7 @@
 
                $limit = $params['limit'];
                $target = $params['target'];
-               $reason = wfMsgForContent( 'checkuser-reason-api' ) . ' ' . 
$params['reason'];
+               $reason = wfMsgForContent( 'checkuser-reason-api', 
$params['reason'] );
                $time = wfTimestamp( TS_MW,
                        strtotime( 'now' ) - ( strtotime( $params['timecond'] ? 
$params['timecond'] : '2 weeks' ) - strtotime( 'now'
                        ) )


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to