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

Change subject: Replace deprecated wfMsg*() methods with wfMessage()
......................................................................


Replace deprecated wfMsg*() methods with wfMessage()

Replaced all instances of a WfMsg*() method with its non-deprecated equivalent

Bug: T70750
Change-Id: Ibd3922b3a55cf0160b980c7c5289137b24093329
---
M Commentbox.php
M SpecialAddComment_body.php
2 files changed, 11 insertions(+), 11 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/Commentbox.php b/Commentbox.php
index 7879425..152e39c 100644
--- a/Commentbox.php
+++ b/Commentbox.php
@@ -65,17 +65,17 @@
        $newaction = htmlspecialchars( Title::newFromText( 'AddComment', 
NS_SPECIAL )->getFullURL() );
        $name = '';
        if ( !$wgUser->isLoggedIn() ) {
-               $namecomment = wfMsgExt( 'commentbox-name-explanation', 
'parseinline' );
-               $namelabel = wfMsgExt( 'commentbox-name', 'parseinline' );
+               $namecomment = $op->msg( 'commentbox-name-explanation' 
)->parse();
+               $namelabel = $op->msg( 'commentbox-name')->parse();
                $name = '<br />' . $namelabel;
                $name .= ' <input name="wpAuthor" tabindex="2" type="text" 
size="30" maxlength="50" /> ';
                $name .= $namecomment;
        }
-       $inhalt = wfMsgNoTrans( 'commentbox-prefill' );
-       $save = wfMsgExt( 'commentbox-savebutton', 'escapenoentities' );
+       $inhalt = $op->msg( 'commentbox-prefill' )->plain();
+       $save = $op->msg( 'commentbox-savebutton' )->parse();
        $texttitle = htmlspecialchars( Title::makeName( $title->getNamespace(), 
$title->getText() ) );
 
-       $intro = wfMsgExt( 'commentbox-intro', 'parse' );
+       $intro = $op->msg( 'commentbox-intro' )->parse();
 
        $text .= <<<END
        <form id="commentform" name="commentform" method="post"
diff --git a/SpecialAddComment_body.php b/SpecialAddComment_body.php
index 18bb40b..77370ab 100644
--- a/SpecialAddComment_body.php
+++ b/SpecialAddComment_body.php
@@ -36,7 +36,7 @@
                        return;
                }
 
-               if ( $Comment == '' || $Comment == wfMsgNoTrans( 
'commentbox-prefill' ) ) {
+               if ( $Comment == '' || $Comment == $this->msg( 
'commentbox-prefill' )->plain() ) {
                        $this->fail( 'commentbox-error-empty-comment', $title );
                        return;
                }
@@ -51,7 +51,7 @@
                $matches = array();
                if ( preg_match( '@https?://[-.\w]+@', $Comment, $matches ) ||
                    preg_match( '@https?://[-.\w]+@', $Author, $matches ) ) {
-                       $wgOut->setPageTitle( wfMsg( 'spamprotectiontitle' ) );
+                       $wgOut->setPageTitle( $this->msg( 'spamprotectiontitle' 
) );
                        $wgOut->setRobotPolicy( 'noindex,nofollow' );
                        $wgOut->setArticleRelated( false );
 
@@ -64,8 +64,8 @@
                $article = new Article( $title );
                $text = $article->getContent();
                $subject = '';
-               if ( !preg_match( wfMsgForContentNoTrans( 'commentbox-regex' ), 
$text ) )
-                       $subject = wfMsgForContent( 
'commentbox-first-comment-heading' ) . "\n";
+               if ( !preg_match( $this->msg( 'commentbox-regex' 
)->inContentLanguage()->plain(), $text ) )
+                       $subject = $this->msg( 
'commentbox-first-comment-heading' )->inContentLanguage()->text() . "\n";
                $sig = $wgUser->isLoggedIn() ? "-- ~~~~" : "-- $Author ~~~~~";
                // Append <br /> after each newline, except if the user started 
a new paragraph
                $Comment = preg_replace( '/(?<!\n)\n(?!\n)/', "<br />\n", 
$Comment );
@@ -73,7 +73,7 @@
 
                $reqArr = array(
                        'wpTextbox1' => $text,
-                       'wpSummary' => wfMsgForContent( 'commentbox-log' ),
+                       'wpSummary' => $this->msg( 'commentbox-log' 
)->inContentLanguage()->text(),
                        'wpEditToken' => $wgUser->getEditToken(),
                        'wpIgnoreBlankSummary' => '',
                        'wpStarttime' => wfTimestampNow(),
@@ -108,7 +108,7 @@
 
        function fail( $str, $title = null ) {
                global $wgOut;
-               $wgOut->setPageTitle( wfMsg( 'commentbox-errorpage-title' ) );
+               $wgOut->setPageTitle( $this->msg( 'commentbox-errorpage-title' 
)->text() );
                $wgOut->wrapWikiMsg( "<div class='errorbox'>$1</div><br 
clear='both' />", $str );
                if ( $title != null )
                        $wgOut->returnToMain( false, $title );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd3922b3a55cf0160b980c7c5289137b24093329
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/Commentbox
Gerrit-Branch: master
Gerrit-Owner: McIntireEvan <[email protected]>
Gerrit-Reviewer: Bartosz Dziewoński <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: McIntireEvan <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to