Siebrand has submitted this change and it was merged.
Change subject: Replace deprecated wfMsg*
......................................................................
Replace deprecated wfMsg*
- Replaces wfMsg* calls
Bug: T70750
Change-Id: I49c3ce9428e5e4a2e49b6cb821af3b1e2307dd9e
---
M PureWikiDeletion.hooks.php
M PureWikiDeletion.php
M SpecialPureWikiDeletion.php
3 files changed, 9 insertions(+), 10 deletions(-)
Approvals:
Siebrand: Verified; Looks good to me, approved
diff --git a/PureWikiDeletion.hooks.php b/PureWikiDeletion.hooks.php
index f32cd5e..77be6c4 100644
--- a/PureWikiDeletion.hooks.php
+++ b/PureWikiDeletion.hooks.php
@@ -46,7 +46,7 @@
}
$blankRevId = $revision->getId();
if ( $text == "" ) {
- if ( $summary == wfMsgForContent( 'autosumm-blank' ) ) {
+ if ( $summary == wfMessage( 'autosumm-blank'
)->inContentLanguage()->text() ) {
$hasHistory = false;
$summary = $article->generateReason(
$hasHistory );
}
@@ -73,9 +73,9 @@
}
wfRunHooks ( 'PureWikiDeletionArticleBlankComplete',
array ( $mTitle ) );
$redirect = false;
- $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
+ $wgOut->setPagetitle( wfMessage( 'actioncomplete' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
- $loglink = wfMsg( 'blank-log-link' );
+ $loglink = wfMessage( 'blank-log-link' )->text();
$wgOut->addWikiMsg( 'purewikideletion-blankedtext',
$mTitle->getPrefixedText(), $loglink );
$wgOut->returnToMain( false );
} else {
@@ -166,14 +166,14 @@
$blanking_user = User::newFromId( $blank_user_id );
$blank_user_name = $blanking_user->getName();
}
- $html = wfMsgExt( 'purewikideletion-blanked', 'parse', array(
+ $html = wfMessage( 'purewikideletion-blanked', array(
$blank_user_name,
$wgLang->timeanddate( wfTimestamp( TS_MW,
$result->blank_timestamp ), true ),
$result->blank_summary,
$result->blank_parent_id,
$wgLang->date( wfTimestamp( TS_MW,
$result->blank_timestamp ), true ),
$wgLang->time( wfTimestamp( TS_MW,
$result->blank_timestamp ), true )
- ) );
+ ) )->parseAsBlock();
$editPage->editFormPageTop .= $html;
if ($wgUser->getOption( 'watchunblank' )){
diff --git a/PureWikiDeletion.php b/PureWikiDeletion.php
index abf0c42..949dda4 100644
--- a/PureWikiDeletion.php
+++ b/PureWikiDeletion.php
@@ -83,12 +83,12 @@
$wgGroupPermissions['bureaucrat']['purewikideletion'] = true;
function wfBlankLogActionText( $type, $action, $title = null, $skin = null,
$params = array(), $filterWikilinks = false ) {
- $rv = wfMsgReal( 'blank-log-entry-blank', $params );
+ $rv = wfMessage( 'blank-log-entry-blank', $params )->text();
return $rv;
}
function wfUnblankLogActionText( $type, $action, $title = null, $skin = null,
$params = array(), $filterWikilinks = false ) {
- $rv = wfMsgReal( 'blank-log-entry-unblank', $params );
+ $rv = wfMessage( 'blank-log-entry-unblank', $params )->text();
return $rv;
}
@@ -104,7 +104,7 @@
$wgOut->showErrorPage( 'purewikideletion-blanknologin',
'purewikideletion-blanknologintext' );
return false;
}
- if ( $summary == wfMsgForContent( 'autosumm-blank' ) ) {
+ if ( $summary == wfMessage( 'autosumm-blank'
)->inContentLanguage()->text() ) {
$hasHistory = false;
$summary = $article->generateReason( $hasHistory );
}
diff --git a/SpecialPureWikiDeletion.php b/SpecialPureWikiDeletion.php
index e43a048..9049f22 100644
--- a/SpecialPureWikiDeletion.php
+++ b/SpecialPureWikiDeletion.php
@@ -118,7 +118,6 @@
}
}
- $output = wfMsg( 'purewikideletion-population-done' );
- $wgOut->addWikiText($output);
+ $wgOut->addWikiMsg( 'purewikideletion-population-done' );
}
}
--
To view, visit https://gerrit.wikimedia.org/r/179582
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I49c3ce9428e5e4a2e49b6cb821af3b1e2307dd9e
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/PureWikiDeletion
Gerrit-Branch: master
Gerrit-Owner: Sn1per <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Paladox <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits