Florianschmidtwelzow has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/150152

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

Fix some wfMsg*

Bug: 68750
Change-Id: I63b6457c707b23741d79831a31ee4bc2b0659032
---
M BlogHooks.php
1 file changed, 19 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage 
refs/changes/52/150152/1

diff --git a/BlogHooks.php b/BlogHooks.php
index 9b056d6..533eeeb 100644
--- a/BlogHooks.php
+++ b/BlogHooks.php
@@ -65,7 +65,7 @@
                        }
 
                        if ( !$wgUser->isAllowed( 'edit' ) || 
$wgUser->isBlocked() ) {
-                               $wgOut->addHTML( wfMsg( 
'blog-permission-required' ) );
+                               $wgOut->addHTML( wfMessage( 
'blog-permission-required' )->text() );
                                return false;
                        }
                }
@@ -107,8 +107,9 @@
                foreach ( $res as $row ) {
                        $ctg = Title::makeTitle( NS_CATEGORY, $row->cl_to );
                        $ctgname = $ctg->getText();
-                       $blogCat = wfMsgForContent( 'blog-category' );
-                       $userBlogCat = wfMsgForContent( 
'blog-by-user-category', $blogCat );
+                       $blogCat = wfMessage( 'blog-category' 
)->inContentLanguage()->text();
+                       $userBlogCat = wfMessage( 'blog-by-user-category', 
$blogCat )
+                               ->inContentLanguage()->text();
 
                        if( strpos( $ctgname, $userBlogCat ) !== false ) {
                                $user_name = trim( str_replace( $userBlogCat, 
'', $ctgname ) );
@@ -211,10 +212,10 @@
                                "Got UserProfile articles for user {$user_name} 
from DB\n"
                        );
                        $categoryTitle = Title::newFromText(
-                               wfMsgForContent(
+                               wfMessage(
                                        'blog-by-user-category',
-                                       wfMsgForContent( 'blog-category' )
-                               ) . " {$user_name}"
+                                       wfMessage( 'key' 
)->inContentLanguage()->text();
+                               )->inContentLanguage()->text() . " {$user_name}"
                        );
 
                        $dbr = wfGetDB( DB_SLAVE );
@@ -256,30 +257,30 @@
 
                $articleLink = Title::makeTitle(
                        NS_CATEGORY,
-                       wfMsgForContent(
+                       wfMessage(
                                'blog-by-user-category',
-                               wfMsgForContent( 'blog-category' )
-                       ) . " {$user_name}"
+                               wfMessage( 'blog-category' 
)->inContentLanguage()->text()
+                       )->inContentLanguage()->text() . " {$user_name}"
                );
 
                if ( count( $articles ) > 0 ) {
                        $output .= '<div class="user-section-heading">
                                <div class="user-section-title">' .
-                                       wfMsg( 'blog-user-articles-title' ) .
+                                       wfMessage( 'blog-user-articles-title' 
)->text() .
                                '</div>
                                <div class="user-section-actions">
                                        <div class="action-right">';
                        if( $articleCount > 5 ) {
                                $output .= '<a href="' . htmlspecialchars( 
$articleLink->getFullURL() ) .
-                                       '" rel="nofollow">' . wfMsg( 
'user-view-all' ) . '</a>';
+                                       '" rel="nofollow">' . wfMessage( 
'user-view-all' )->text() . '</a>';
                        }
                        $output .= '</div>
-                                       <div class="action-left">' . wfMsgExt(
+                                       <div class="action-left">' .
+                                       wfMessage(
                                                'user-count-separator',
-                                               'parsemag',
                                                count( $articles ),
                                                $articleCount
-                                       ) . '</div>
+                                       )->text() . '</div>
                                        <div class="cleared"></div>
                                </div>
                        </div>
@@ -305,22 +306,20 @@
                                        <div class=\"number-of-votes\">
                                                <div 
class=\"vote-number\">{$voteCount}</div>
                                                <div class=\"vote-text\">" .
-                                                       wfMsgExt(
+                                                       wfMessage(
                                                                
'blog-user-articles-votes',
-                                                               'parsemag',
                                                                $voteCount
-                                                       ) .
+                                                       )->text() .
                                                '</div>
                                        </div>
                                        <div class="article-title">
                                                <a href="' . htmlspecialchars( 
$articleTitle->getFullURL() ) .
                                                        
"\">{$articleTitle->getText()}</a>
                                                <span class=\"item-small\">" .
-                                                       wfMsgExt(
+                                                       wfMessage(
                                                                
'blog-user-article-comment',
-                                                               'parsemag',
                                                                $commentCount
-                                                       ) . '</span>
+                                                       )->text() . '</span>
                                        </div>
                                        <div class="cleared"></div>
                                </div>';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63b6457c707b23741d79831a31ee4bc2b0659032
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlogPage
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow <florian.schmidt.wel...@t-online.de>
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