jenkins-bot has submitted this change and it was merged.

Change subject: Fix some wfMsg*
......................................................................


Fix some wfMsg*

Bug: 68750
Change-Id: Iffb83f754de7ecdf2067f72e6375d6b2d5b80c11
---
M OnlineStatus.body.php
1 file changed, 19 insertions(+), 11 deletions(-)

Approvals:
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/OnlineStatus.body.php b/OnlineStatus.body.php
index 651077c..c3f06fd 100644
--- a/OnlineStatus.body.php
+++ b/OnlineStatus.body.php
@@ -44,13 +44,13 @@
                global $wgUser;
 
                if ( $wgUser->isAnon() ) {
-                       return wfMsgHtml( 'onlinestatus-js-anon' );
+                       return wfMessage( 'onlinestatus-js-anon' )->escaped();
                }
 
                switch( $action ) {
                case 'get':
                        $def = $wgUser->getOption( 'online' );
-                       $msg = wfMsgForContentNoTrans( 'onlinestatus-levels' );
+                       $msg = wfMessage( 'onlinestatus-levels' 
)->inContentLanguage()->plain();
                        $lines = explode( "\n", $msg );
                        $radios = array();
 
@@ -64,7 +64,7 @@
                                $lev = trim( $line, '* ' );
                                $radios[] = array(
                                        $lev,
-                                       wfMsg( 'onlinestatus-toggle-' . $lev ),
+                                       wfMessage( 'onlinestatus-toggle-' . 
$lev )->text(),
                                        $lev == $def
                                );
                        }
@@ -87,9 +87,12 @@
 
                                // For grep. Message keys used here:
                                // onlinestatus-toggle-offline, 
onlinestatus-toggle-online
-                               return wfMsgHtml( 'onlinestatus-js-changed', 
wfMsgHtml( 'onlinestatus-toggle-' . $stat ) );
+                               return wfMessage(
+                                       'onlinestatus-js-changed',
+                                       wfMessage( 'onlinestatus-toggle-' . 
$stat )->escaped()
+                               )->text();
                        } else {
-                               return wfMsgHtml( 'onlinestatus-js-error', 
$stat );
+                               return wfMessage( 'onlinestatus-js-error', 
$stat )->escaped();
                        }
                }
        }
@@ -118,7 +121,7 @@
                if ( empty( $raw ) ) {
                        // For grep. Message keys used here:
                        // onlinestatus-toggle-offline, 
onlinestatus-toggle-online
-                       return wfMsgNoTrans( 'onlinestatus-toggle-' . 
$status[0] );
+                       return wfMessage( 'onlinestatus-toggle-' . $status[0] 
)->plain();
                } else {
                        return $status[0];
                }
@@ -147,7 +150,7 @@
 
                        // For grep. Message keys used here:
                        // onlinestatus-toggle-offline, 
onlinestatus-toggle-online
-                       $ret = wfMsgNoTrans( 'onlinestatus-toggle-' . 
$status[0] );
+                       $ret = wfMessage( 'onlinestatus-toggle-' . $status[0] 
)->plain();
                        $varCache['onlinestatus'] = $ret;
                } elseif ( $index == 'onlinestatus_word_raw' ) {
                        $status = self::GetUserStatus( $parser->getTitle() );
@@ -167,7 +170,7 @@
         * Hook for user preferences
         */
        public static function GetPreferences( $user, &$preferences ) {
-               $msg = wfMsgForContentNoTrans( 'onlinestatus-levels' );
+               $msg = wfMessage( 'onlinestatus-levels' 
)->inContentLanguage()->plain();
                $lines = explode( "\n", $msg );
                $radios = array();
 
@@ -179,7 +182,7 @@
                        // For grep. Message keys used here:
                        // onlinestatus-toggle-offline, 
onlinestatus-toggle-online
                        $lev = trim( $line, '* ' );
-                       $radios[wfMsg( 'onlinestatus-toggle-' . $lev )] = $lev;
+                       $radios[wfMessage( 'onlinestatus-toggle-' . $lev 
)->text()] = $lev;
                }
 
                $preferences['onlineonlogin'] =
@@ -273,7 +276,12 @@
 
                // For grep. Message keys used here:
                // onlinestatus-subtitle-offline, onlinestatus-subtitle-online
-               $out->setSubtitle( wfMsgExt( 'onlinestatus-subtitle-' . 
$status[0], array( 'parse' ), $status[1] ) );
+               $out->setSubtitle(
+                       wfMessage(
+                               'onlinestatus-subtitle-' . $status[0],
+                               $status[1]
+                       )->parseAsBlock()
+               );
 
                return true;
        }
@@ -293,7 +301,7 @@
                foreach ( $urls as $key => $val ) {
                        if ( $key == 'logout' ) {
                                $arr['status'] = array(
-                                       'text' => wfMsgHtml( 'onlinestatus-tab' 
),
+                                       'text' => wfMessage( 'onlinestatus-tab' 
)->escaped(),
                                        'href' => 'javascript:;',
                                        'active' => false,
                                );

-- 
To view, visit https://gerrit.wikimedia.org/r/150154
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffb83f754de7ecdf2067f72e6375d6b2d5b80c11
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/OnlineStatus
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>
Gerrit-Reviewer: Alex Monk <kren...@wikimedia.org>
Gerrit-Reviewer: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>
Gerrit-Reviewer: Siebrand <siebr...@kitano.nl>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to