MtDu has uploaded a new change for review.

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

Change subject: Replace deprecated wfMsg* functions
......................................................................

Replace deprecated wfMsg* functions

Bug: T70750
Change-Id: Icff8126ec3546427ba486c2d2279c86b85aac661
---
M IndexFunction_body.php
M SpecialIndex.php
2 files changed, 14 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/IndexFunction 
refs/changes/61/262061/1

diff --git a/IndexFunction_body.php b/IndexFunction_body.php
index 4d88d5b..9ec9be0 100644
--- a/IndexFunction_body.php
+++ b/IndexFunction_body.php
@@ -207,7 +207,7 @@
                        $t = Title::newFromText( $name );
 
                        if ( is_null( $t ) ) {
-                               $errors[] = wfMsg( 'indexfunc-badtitle', $name 
);
+                               $errors[] = wfMessage( 'indexfunc-badtitle', 
$name )->text();
                                continue;
                        }
 
@@ -220,7 +220,7 @@
                        }
 
                        if ( $t->exists() ) {
-                               $errors[] = wfMsg( 'indexfunc-index-exists', 
$name );
+                               $errors[] = wfMessage( 
'indexfunc-index-exists', $name )->text();
                                continue;
                        }
                        $indexCount++;
@@ -336,7 +336,7 @@
 
                $list = $index->makeTargetList();
                $c = count( $index->getTargets() );
-               $warn = wfMsgExt( 'indexfunc-editwarning', array( 'parsemag' ), 
$list, $c );
+               $warn = wfMessage( 'indexfunc-editwarning', $list, $c )->text();
                $editpage->editFormTextTop .= "<span 
class='error'>$warn</span>";
 
                return true;
@@ -362,7 +362,7 @@
                         __METHOD__
                );
 
-               $msg = wfMsgExt( 'indexfunc-movewarn', array( 'parsemag' ), 
$new->getPrefixedText(), $list, $c );
+               $msg = wfMessage( 'indexfunc-movewarn', 
$new->getPrefixedText(), $list, $c )->text();
                $msg = "<span class='error'>$msg</span>";
 
                $wgOut->addHTML( $msg );
diff --git a/SpecialIndex.php b/SpecialIndex.php
index bcde483..43e69be 100644
--- a/SpecialIndex.php
+++ b/SpecialIndex.php
@@ -30,8 +30,8 @@
                        $link = Linker::link( $title, 
$targettitle->getPrefixedText(), array( 'class' => 'mw-index' ), array(), 
array( 'known', 'noclasses' ) );
 
                        $jsid = $this->mJSid;
-                       $expandTitle = wfMsgHtml( 'index-expand-detail' );
-                       $closeTitle = wfMsgHtml( 'index-hide-detail' );
+                       $expandTitle = $this->msg( 'index-expand-detail' 
)->escaped();
+                       $closeTitle = $this->msg( 'index-hide-detail' 
)->escaped();
                        $toggleLink = "onclick='toggleVisibility($jsid); return 
false'";
                        $tl = "<span id='mw-index-open-$jsid' 
class='mw-index-expanded' style='visibility:hidden' ><a href='#' $toggleLink 
title='$expandTitle'>" . $this->sideArrow() . "</a></span>";
                        $tl .= "<span id='mw-index-close-$jsid' 
class='mw-index-hidden' style='display:none'><a href='#' $toggleLink 
title='$closeTitle'>" . $this->downArrow() . "</a></span>";
@@ -76,11 +76,11 @@
 
                $dir = $wgContLang->isRTL() ? 'l' : 'r';
 
-               return $this->arrow( $dir, '+', wfMsg( 'index-expand-detail' ) 
);
+               return $this->arrow( $dir, '+', $this->msg( 
'index-expand-detail' )->text() );
        }
 
        protected function downArrow() {
-               return $this->arrow( 'd', '-', wfMsg( 'index-hide-detail' ) );
+               return $this->arrow( 'd', '-', $this->msg( 'index-hide-detail' 
)->text() );
        }
 
        protected function spacerArrow() {
@@ -96,7 +96,7 @@
        }
 
        function getEmptyBody() {
-               return "<tr><td class='errorbox'>" . wfMsgHtml( 
'index-no-results' ) . "</td></tr>";
+               return "<tr><td class='errorbox'>" . $this->msg( 
'index-no-results' )->escaped . "</td></tr>";
        }
 
        // Need to override reallyDoQuery() to do the UNION
@@ -173,14 +173,14 @@
                $wgOut->addScriptFile( 
"$wgExtensionAssetsPath/IndexFunction/specialindex.js" );
                $wgOut->addWikiMsg( 'index-search-explain' );
                $form = Xml::openElement( 'fieldset', array( 'style' => 
'line-height:200%' ) ) .
-               Xml::element( 'legend', array(), wfMsgHtml( 'index-legend' ) ) .
+               Xml::element( 'legend', array(), $this->msg( 'index-legend' 
)->escaped() ) .
                Xml::openElement( 'form', array( 'method' => 'GET', 'action' => 
$wgScript ) ) .
                 Html::Hidden( 'title', 
$this->getPageTitle()->getPrefixedDbKey() ) .
 
-               Xml::label( wfMsg( 'index-search' ), 'mw-index-searchtext' ) .
+               Xml::label( $this->msg( 'index-search' )->text(), 
'mw-index-searchtext' ) .
                Xml::input( 'searchtext', 100, $search, array( 'id' => 
'mw-index-searchtext' ) ) .
                '<br />' .
-               Xml::submitButton( wfMsg( 'index-submit' ) ) .
+               Xml::submitButton( $this->msg( 'index-submit' )->text() ) .
 
                Xml::closeElement( 'form' ) .
                Xml::closeElement( 'fieldset' );
@@ -193,7 +193,7 @@
                        $t = Title::newFromText( $wgRequest->getVal( 
'searchtext' ) );
                        $pager = new SpecialIndexPager( $t );
                        $out = Xml::openElement( 'div', array( 'id' => 
'mw-index-searchresults' ) ) .
-                               '<div id="use-js-note" style="display:none">' . 
wfMsgExt( 'index-details-explain' , array( 'parse' ) ) . '</div>' .
+                               '<div id="use-js-note" style="display:none">' . 
$this->msg( 'index-details-explain')->parseAsBlock() . '</div>' .
                                $pager->getNavigationBar() .
                                Xml::openElement( 'table' ) .
                                $pager->getBody() .
@@ -238,7 +238,7 @@
                $keys = array_keys( $list );
                $set = '(' . implode( ',', $keys ) . ')';
 
-               $exclude = wfMsg( 'index-exclude-categories' );
+               $exclude = $this->msg( 'index-exclude-categories' )->text();
                $excludecats = array();
 
                if ( $exclude ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icff8126ec3546427ba486c2d2279c86b85aac661
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/IndexFunction
Gerrit-Branch: master
Gerrit-Owner: MtDu <[email protected]>

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

Reply via email to