Paladox has submitted this change and it was merged.
Change subject: Replace deprecated function wfMsg()
......................................................................
Replace deprecated function wfMsg()
- Replaces wfMsg() function calls with
their non-deprecated equivalents
Bug: T70750
Change-Id: I7f59128f3709a3befbf9d98fe75e4843736c2b1f
(cherry picked from commit 691b4c3a79cf7277ad1eedb6c24d7ebe076e968c)
---
M MediaWikiFarmer.php
M MediaWikiFarmer_Wiki.php
M SpecialFarmer.php
3 files changed, 16 insertions(+), 16 deletions(-)
Approvals:
Paladox: Verified; Looks good to me, approved
diff --git a/MediaWikiFarmer.php b/MediaWikiFarmer.php
index bae873d..ed06a04 100644
--- a/MediaWikiFarmer.php
+++ b/MediaWikiFarmer.php
@@ -472,7 +472,7 @@
$content = serialize( $this->_extensions );
if ( file_put_contents( $file, $content, LOCK_EX ) != strlen(
$content ) ) {
- throw new MWException( wfMsgHtml(
'farmer-error-noextwrite' ) . wfMsgHtml( 'word-separator' ) . $file );
+ throw new MWException( wfMessage(
'farmer-error-noextwrite' )->escaped() . wfMessage( 'word-separator'
)->escaped() . $file );
}
}
diff --git a/MediaWikiFarmer_Wiki.php b/MediaWikiFarmer_Wiki.php
index 33f355b..ace5532 100644
--- a/MediaWikiFarmer_Wiki.php
+++ b/MediaWikiFarmer_Wiki.php
@@ -142,7 +142,7 @@
$this->createDatabase();
$farmer->updateFarmList();
} else {
- throw new MWException( wfMsgHtml(
'farmer-error-exists', $this->_name ) );
+ throw new MWException( wfMessage(
'farmer-error-exists')->rawParams( $this->_name )->escaped() );
}
}
@@ -328,7 +328,7 @@
}
$url = $server . $articlePath;
} else {
- $url = wfMsgForContent( 'farmerinterwikiurl',
$this->name, '$1' );
+ $url = wfMessage( 'farmerinterwikiurl' )->rawParams(
$this->name, '$1' )->inContentLanguage()->text();
}
if ( !is_null( $article ) )
$url = str_replace( '$1', $article, $url );
@@ -469,7 +469,7 @@
$newid = $article->insertOn( $db );
$revision = new Revision( array(
'page' => $newid,
- 'text' => wfMsgForContent( 'farmernewwikimainpage' ),
+ 'text' => wfMessage( 'farmernewwikimainpage'
)->inContentLanguage()->text(),
'comment' => '',
'user' => 0,
'user_text' => 'MediaWiki default',
diff --git a/SpecialFarmer.php b/SpecialFarmer.php
index b670dec..7a9fe15 100644
--- a/SpecialFarmer.php
+++ b/SpecialFarmer.php
@@ -162,7 +162,7 @@
$nameaccount = htmlspecialchars( $name );
$nametitle = htmlspecialchars( $title );
$namedescript = htmlspecialchars( $description
);
- $confirmaccount = wfMsgHtml(
'farmer-button-confirm' );
+ $confirmaccount = wfMessage(
'farmer-button-confirm' )->escaped();
$wgOut->addHTML( "
<form id=\"farmercreate2\" method=\"post\" action=\"$action\">
@@ -296,7 +296,7 @@
$current = $wgFarmer->getActiveWiki()->name;
foreach ( $list as $wiki ) {
- $link = ( $current == $wiki['name'] ? wfMsgForContent(
'mainpage' ) : $wiki['name'] . ':' );
+ $link = ( $current == $wiki['name'] ? wfMessage(
'mainpage' )->inContentLanguage()->text() : $wiki['name'] . ':' );
$wgOut->addWikiText( '; [[' . $link . '|' .
$wiki['title'] . ']] : ' . $wiki['description'] );
}
}
@@ -337,7 +337,7 @@
$wgOut->addHTML(
'<form method="post" name="wikiTitle" action="'
. $action . '">' .
'<input name="wikiTitle" size="30" value="' .
$wiki->title . '" />' .
- '<input type="submit" name="submit" value="' .
wfMsgHtml( 'farmer-button-submit' ) . '" />' .
+ '<input type="submit" name="submit" value="' .
wfMessage( 'farmer-button-submit' )->escaped() . '" />' .
'</form>'
);
}
@@ -348,7 +348,7 @@
$wgOut->addHTML(
'<form method="post" name="wikiDescription" action="' .
$action . '">' .
'<textarea name="wikiDescription" rows="5" cols="30">'
. htmlspecialchars( $wiki->description ) . '</textarea>' .
- '<input type="submit" name="submit" value="' .
wfMsgHtml( 'farmer-button-submit' ) . '" />' .
+ '<input type="submit" name="submit" value="' .
wfMessage( 'farmer-button-submit' )->escaped() . '" />' .
'</form>'
);
@@ -448,7 +448,7 @@
$wgOut->addHTML( $toAdd . "<br />\n" );
}
- $wgOut->addHTML( '<input type="submit"
name="submitDefaultSkin" value="' . wfMsgHtml( 'farmer-defaultskin-button' ) .
'" />' );
+ $wgOut->addHTML( '<input type="submit"
name="submitDefaultSkin" value="' . wfMessage( 'farmer-defaultskin-button'
)->escaped() . '" />' );
$wgOut->addHTML( '</form>' );
}
@@ -484,7 +484,7 @@
$wgOut->addHTML( $toAdd );
}
- $wgOut->addHTML( '<input type="submit"
name="submitExtension" value="' . wfMsgHtml( 'farmer-extensions-button' ) . '"
/>' );
+ $wgOut->addHTML( '<input type="submit"
name="submitExtension" value="' . wfMessage( 'farmer-extensions-button'
)->escaped() . '" />' );
$wgOut->addHTML( '</form>' );
}
}
@@ -549,20 +549,20 @@
<form id=\"registerExtension\" method=\"post\">
<table>
<tr>
- <td align=\"right\">" . wfMsgHtml(
'farmer-extensions-register-name' ) . "</td>
+ <td align=\"right\">" . wfMessage(
'farmer-extensions-register-name' )->escaped() . "</td>
<td align=\"left\"><input type=\"text\" size=\"20\"
name=\"name\" value=\"\" /></td>
</tr>
<tr>
- <td align=\"right\">" . wfMsgHtml( 'farmer-description'
) . "</td>
+ <td align=\"right\">" . wfMessage( 'farmer-description'
)->escaped() . "</td>
<td align=\"left\"><input type=\"text\" size=\"50\"
name=\"description\" value=\"\" /></td>
</tr>
<tr>
- <td align=\"right\">" . wfMsgHtml(
'farmer-extensions-register-includefile' ) . "</td>
+ <td align=\"right\">" . wfMessage(
'farmer-extensions-register-includefile' )->escaped() . "</td>
<td align=\"left\"><input type=\"text\" size=\"50\"
name=\"include\" value=\"\" /></td>
</tr>
<tr>
<td> </td>
- <td align=\"right\"><input type=\"submit\"
name=\"submit\" value=\"" . wfMsgHtml( 'farmer-button-submit' ) . "\" /></td>
+ <td align=\"right\"><input type=\"submit\"
name=\"submit\" value=\"" . wfMessage( 'farmer-button-submit' )->escaped() .
"\" /></td>
</tr>
</table>
</form>" );
@@ -582,7 +582,7 @@
$input .= 'checked="checked" ';
}
- $input .= ' />' . wfMsgHtml( 'farmer-yes' ) . '  ';
+ $input .= ' />' . wfMessage( 'farmer-yes' )->escaped() .
'  ';
$wgOut->addHTML( $input );
@@ -592,7 +592,7 @@
$input .= 'checked="checked" ';
}
- $input .= ' />' . wfMsgHtml( 'farmer-no' );
+ $input .= ' />' . wfMessage( 'farmer-no' )->escaped();
$wgOut->addHTML( $input . '</p>' );
}
--
To view, visit https://gerrit.wikimedia.org/r/178451
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7f59128f3709a3befbf9d98fe75e4843736c2b1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Farmer
Gerrit-Branch: REL1_24
Gerrit-Owner: Paladox <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: Sn1per <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits