aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/EditPage.php19
-rw-r--r--includes/FileDeleteForm.php4
-rw-r--r--includes/OutputPage.php52
-rw-r--r--includes/ProtectionForm.php2
-rw-r--r--includes/actions/MarkpatrolledAction.php4
-rw-r--r--includes/actions/RollbackAction.php4
-rw-r--r--includes/specials/SpecialBlock.php4
-rw-r--r--includes/specials/SpecialBlockList.php2
-rw-r--r--includes/specials/SpecialContributions.php4
-rw-r--r--includes/specials/SpecialDeletedContributions.php2
-rw-r--r--includes/specials/SpecialEditWatchlist.php6
-rw-r--r--includes/specials/SpecialEmailuser.php4
-rw-r--r--includes/specials/SpecialMergeHistory.php4
-rw-r--r--includes/specials/SpecialRecentchangeslinked.php2
-rw-r--r--includes/specials/SpecialSearch.php4
-rw-r--r--includes/specials/SpecialTags.php2
-rw-r--r--includes/specials/SpecialUnblock.php2
-rw-r--r--includes/specials/SpecialUndelete.php10
-rw-r--r--includes/specials/SpecialUserlogin.php12
-rw-r--r--includes/specials/SpecialWatchlist.php2
-rw-r--r--includes/specials/SpecialWhatlinkshere.php2
21 files changed, 84 insertions, 63 deletions
diff --git a/includes/EditPage.php b/includes/EditPage.php
index f84e0a520f28..7c4221a462b8 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1360,14 +1360,11 @@ class EditPage {
function setHeaders() {
global $wgOut;
$wgOut->setRobotPolicy( 'noindex,nofollow' );
- if ( $this->formtype == 'preview' ) {
- $wgOut->setPageTitleActionText( wfMsg( 'preview' ) );
- }
if ( $this->isConflict ) {
- $wgOut->setPageTitle( wfMsg( 'editconflict', $this->getContextTitle()->getPrefixedText() ) );
+ $wgOut->setPageTitleMsg( 'editconflict', $this->getContextTitle()->getPrefixedText() );
} elseif ( $this->section != '' ) {
$msg = $this->section == 'new' ? 'editingcomment' : 'editingsection';
- $wgOut->setPageTitle( wfMsg( $msg, $this->getContextTitle()->getPrefixedText() ) );
+ $wgOut->setPageTitleMsg( $msg, $this->getContextTitle()->getPrefixedText() );
} else {
# Use the title defined by DISPLAYTITLE magic word when present
if ( isset( $this->mParserOutput )
@@ -1376,7 +1373,7 @@ class EditPage {
} else {
$title = $this->getContextTitle()->getPrefixedText();
}
- $wgOut->setPageTitle( wfMsg( 'editing', $title ) );
+ $wgOut->setPageTitleMsg( 'editing', $title );
}
}
@@ -2229,7 +2226,7 @@ HTML
array( 'returnto' => $this->getContextTitle()->getPrefixedText() )
);
- $wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) );
+ $wgOut->setPageTitleMsg( 'whitelistedittitle' );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
@@ -2244,7 +2241,7 @@ HTML
function noSuchSectionPage() {
global $wgOut;
- $wgOut->setPageTitle( wfMsg( 'nosuchsectiontitle' ) );
+ $wgOut->setPageTitleMsg( 'nosuchsectiontitle' );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
@@ -2264,7 +2261,7 @@ HTML
static function spamPage( $match = false ) {
global $wgOut, $wgTitle;
- $wgOut->setPageTitle( wfMsg( 'spamprotectiontitle' ) );
+ $wgOut->setPageTitleMsg( 'spamprotectiontitle' );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
@@ -2287,7 +2284,7 @@ HTML
global $wgOut;
$this->textbox2 = $this->textbox1;
- $wgOut->setPageTitle( wfMsg( 'spamprotectiontitle' ) );
+ $wgOut->setPageTitleMsg( 'spamprotectiontitle' );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
@@ -2848,7 +2845,7 @@ HTML
function noCreatePermission() {
global $wgOut;
- $wgOut->setPageTitle( wfMsg( 'nocreatetitle' ) );
+ $wgOut->setPageTitleMsg( 'nocreatetitle' );
$wgOut->addWikiMsg( 'nocreatetext' );
}
diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php
index ca195d88fc0e..e70d551f1fed 100644
--- a/includes/FileDeleteForm.php
+++ b/includes/FileDeleteForm.php
@@ -78,7 +78,7 @@ class FileDeleteForm {
$wgOut->addHTML( '</span>' );
}
if( $status->ok ) {
- $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
+ $wgOut->setPageTitleMsg( 'actioncomplete' );
$wgOut->addHTML( $this->prepareMessage( 'filedelete-success' ) );
// Return to the main page if we just deleted all versions of the
// file, otherwise go back to the description page
@@ -271,7 +271,7 @@ class FileDeleteForm {
*/
private function setHeaders() {
global $wgOut;
- $wgOut->setPageTitle( wfMsg( 'filedelete', $this->title->getText() ) );
+ $wgOut->setPageTitleMsg( 'filedelete', $this->title->getText() );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setSubtitle( wfMsg(
'filedelete-backlink',
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 3df9dff00236..ad5db3c331d0 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -761,6 +761,19 @@ class OutputPage extends ContextSource {
}
/**
+ * Same as setHTMLTitle(), but takes a message name and parameter instead
+ * of directly the string to display.
+ *
+ * @since 1.19
+ * @param $name String message name
+ * @param $args Array|String message parameters, if there's only one
+ * parameter it can be passed directly as a string.
+ */
+ public function setHTMLTitleMsg( $name, $args = array() ) {
+ $this->setHTMLTitle( $this->msg( $name, $args )->text() );
+ }
+
+ /**
* Return the "HTML title", i.e. the content of the <title> tag.
*
* @return String
@@ -784,7 +797,20 @@ class OutputPage extends ContextSource {
$this->mPagetitle = $nameWithTags;
# change "<i>foo&amp;bar</i>" to "foo&bar"
- $this->setHTMLTitle( $this->msg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) )->text() );
+ $this->setHTMLTitleMsg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) );
+ }
+
+ /**
+ * Same as setPageTitle(), but takes a message name and parameter instead
+ * of directly the string to display.
+ *
+ * @since 1.19
+ * @param $name String message name
+ * @param $args Array|String message parameters, if there's only one
+ * parameter it can be passed directly as a string.
+ */
+ public function setPageTitleMsg( $name, $args = array() ) {
+ $this->setPageTitle( $this->msg( $name, $args )->text() );
}
/**
@@ -1927,8 +1953,8 @@ class OutputPage extends ContextSource {
if ( $this->getTitle() ) {
$this->mDebugtext .= 'Original title: ' . $this->getTitle()->getPrefixedText() . "\n";
}
- $this->setPageTitle( $this->msg( $title )->text() );
- $this->setHTMLTitle( $this->msg( 'errorpagetitle' )->text() );
+ $this->setPageTitleMsg( $title );
+ $this->setHTMLTitleMsg( 'errorpagetitle' );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
$this->enableClientCache( false );
@@ -1953,8 +1979,8 @@ class OutputPage extends ContextSource {
public function showPermissionsErrorPage( $errors, $action = null ) {
$this->mDebugtext .= 'Original title: ' .
$this->getTitle()->getPrefixedText() . "\n";
- $this->setPageTitle( $this->msg( 'permissionserrors' )->text() );
- $this->setHTMLTitle( $this->msg( 'permissionserrors' )->text() );
+ $this->setPageTitleMsg( 'permissionserrors' );
+ $this->setHTMLTitleMsg( 'permissionserrors' );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
$this->enableClientCache( false );
@@ -1970,8 +1996,8 @@ class OutputPage extends ContextSource {
* @param $version Mixed: the version of MediaWiki needed to use the page
*/
public function versionRequired( $version ) {
- $this->setPageTitle( $this->msg( 'versionrequired', $version )->text() );
- $this->setHTMLTitle( $this->msg( 'versionrequired', $version )->text() );
+ $this->setPageTitleMsg( 'versionrequired' );
+ $this->setHTMLTitleMsg( 'versionrequired', $version );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
$this->mBodytext = '';
@@ -1997,8 +2023,8 @@ class OutputPage extends ContextSource {
throw new PermissionsError( 'read' );
}
- $this->setPageTitle( $this->msg( 'loginreqtitle' )->text() );
- $this->setHTMLTitle( $this->msg( 'errorpagetitle' )->text() );
+ $this->setPageTitleMsg( 'loginreqtitle' );
+ $this->setHTMLTitleMsg( 'errorpagetitle' );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
@@ -2090,12 +2116,12 @@ class OutputPage extends ContextSource {
if ( !empty( $reasons ) ) {
// Permissions error
if( $source ) {
- $this->setPageTitle( $this->msg( 'viewsource' )->text() );
+ $this->setPageTitleMsg( 'viewsource' );
$this->setSubtitle(
$this->msg( 'viewsourcefor', Linker::linkKnown( $this->getTitle() ) )->text()
);
} else {
- $this->setPageTitle( $this->msg( 'badaccess' )->text() );
+ $this->setPageTitleMsg( 'badaccess' );
}
$this->addWikiText( $this->formatPermissionsErrorMessage( $reasons, $action ) );
} else {
@@ -2165,7 +2191,7 @@ $templates
}
public function showFatalError( $message ) {
- $this->setPageTitle( $this->msg( 'internalerror' )->text() );
+ $this->setPageTitleMsg( 'internalerror' );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
$this->enableClientCache( false );
@@ -2257,7 +2283,7 @@ $templates
$ret = Html::htmlHeader( array( 'lang' => $this->getLang()->getCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) );
if ( $this->getHTMLTitle() == '' ) {
- $this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() )->text() );
+ $this->setHTMLTitleMsg( 'pagetitle', $this->getPageTitle() );
}
$openHead = Html::openElement( 'head' );
diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php
index 97714935ce5f..4d9080808c5e 100644
--- a/includes/ProtectionForm.php
+++ b/includes/ProtectionForm.php
@@ -224,7 +224,7 @@ class ProtectionForm {
}
$titleLink = Linker::link( $this->mTitle );
- $wgOut->setPageTitle( wfMsg( 'protect-title', $this->mTitle->getPrefixedText() ) );
+ $wgOut->setPageTitleMsg( 'protect-title', $this->mTitle->getPrefixedText() );
$wgOut->setSubtitle( wfMsg( 'protect-backlink', $titleLink ) );
# Show an appropriate message if the user isn't allowed or able to change
diff --git a/includes/actions/MarkpatrolledAction.php b/includes/actions/MarkpatrolledAction.php
index a5d766276011..0ac5293c9fb8 100644
--- a/includes/actions/MarkpatrolledAction.php
+++ b/includes/actions/MarkpatrolledAction.php
@@ -67,7 +67,7 @@ class MarkpatrolledAction extends FormlessAction {
$return = SpecialPage::getTitleFor( $returnto );
if ( in_array( array( 'markedaspatrollederror-noautopatrol' ), $errors ) ) {
- $this->getOutput()->setPageTitle( wfMsg( 'markedaspatrollederror' ) );
+ $this->getOutput()->setPageTitleMsg( 'markedaspatrollederror' );
$this->getOutput()->addWikiMsg( 'markedaspatrollederror-noautopatrol' );
$this->getOutput()->returnToMain( null, $return );
return;
@@ -79,7 +79,7 @@ class MarkpatrolledAction extends FormlessAction {
}
# Inform the user
- $this->getOutput()->setPageTitle( wfMsg( 'markedaspatrolled' ) );
+ $this->getOutput()->setPageTitleMsg( 'markedaspatrolled' );
$this->getOutput()->addWikiMsg( 'markedaspatrolledtext', $rc->getTitle()->getPrefixedText() );
$this->getOutput()->returnToMain( null, $return );
}
diff --git a/includes/actions/RollbackAction.php b/includes/actions/RollbackAction.php
index 9036ebf5e6ef..b1d3b1932ac2 100644
--- a/includes/actions/RollbackAction.php
+++ b/includes/actions/RollbackAction.php
@@ -54,7 +54,7 @@ class RollbackAction extends FormlessAction {
}
if ( isset( $result[0][0] ) && ( $result[0][0] == 'alreadyrolled' || $result[0][0] == 'cantrollback' ) ) {
- $this->getOutput()->setPageTitle( wfMsg( 'rollbackfailed' ) );
+ $this->getOutput()->setPageTitleMsg( 'rollbackfailed' );
$errArray = $result[0];
$errMsg = array_shift( $errArray );
$this->getOutput()->addWikiMsgArray( $errMsg, $errArray );
@@ -95,7 +95,7 @@ class RollbackAction extends FormlessAction {
$current = $details['current'];
$target = $details['target'];
$newId = $details['newid'];
- $this->getOutput()->setPageTitle( wfMsg( 'actioncomplete' ) );
+ $this->getOutput()->setPageTitleMsg( 'actioncomplete' );
$this->getOutput()->setRobotPolicy( 'noindex,nofollow' );
if ( $current->getUserText() === '' ) {
diff --git a/includes/specials/SpecialBlock.php b/includes/specials/SpecialBlock.php
index 9c6674ae376f..25114f8eb8cd 100644
--- a/includes/specials/SpecialBlock.php
+++ b/includes/specials/SpecialBlock.php
@@ -91,7 +91,7 @@ class SpecialBlock extends SpecialPage {
$this->outputHeader();
$out = $this->getOutput();
- $out->setPageTitle( wfMsg( 'blockip-title' ) );
+ $out->setPageTitleMsg( 'blockip-title' );
$out->addModules( array( 'mediawiki.special', 'mediawiki.special.block' ) );
$fields = $this->getFormFields();
@@ -111,7 +111,7 @@ class SpecialBlock extends SpecialPage {
$this->doPostText( $form );
if( $form->show() ){
- $out->setPageTitle( wfMsg( 'blockipsuccesssub' ) );
+ $out->setPageTitleMsg( 'blockipsuccesssub' );
$out->addWikiMsg( 'blockipsuccesstext', $this->target );
}
}
diff --git a/includes/specials/SpecialBlockList.php b/includes/specials/SpecialBlockList.php
index c25947df3c65..f6041cabdf22 100644
--- a/includes/specials/SpecialBlockList.php
+++ b/includes/specials/SpecialBlockList.php
@@ -43,7 +43,7 @@ class SpecialBlockList extends SpecialPage {
$this->setHeaders();
$this->outputHeader();
$out = $this->getOutput();
- $out->setPageTitle( wfMsg( 'ipblocklist' ) );
+ $out->setPageTitleMsg( 'ipblocklist' );
$out->addModuleStyles( 'mediawiki.special' );
$request = $this->getRequest();
diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php
index 307181cbc71d..c39f9de55c43 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -84,14 +84,14 @@ class SpecialContributions extends SpecialPage {
if( $this->opts['contribs'] != 'newbie' ) {
$target = $nt->getText();
$out->setSubtitle( $this->contributionsSub( $nt, $id ) );
- $out->setHTMLTitle( wfMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ) );
+ $out->setHTMLTitleMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) );
$userObj = User::newFromName( $target, false );
if ( is_object( $userObj ) ) {
$this->getSkin()->setRelevantUser( $userObj );
}
} else {
$out->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
- $out->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
+ $out->setHTMLTitleMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) );
}
if( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php
index e97fe4ceb183..752a84fcabb9 100644
--- a/includes/specials/SpecialDeletedContributions.php
+++ b/includes/specials/SpecialDeletedContributions.php
@@ -268,7 +268,7 @@ class DeletedContributionsPage extends SpecialPage {
$request = $this->getRequest();
$out = $this->getOutput();
- $out->setPageTitle( wfMsgExt( 'deletedcontributions-title', array( 'parsemag' ) ) );
+ $out->setPageTitleMsg( 'deletedcontributions-title' );
$options = array();
diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php
index 97d0073cd56f..2e2554fce1e2 100644
--- a/includes/specials/SpecialEditWatchlist.php
+++ b/includes/specials/SpecialEditWatchlist.php
@@ -34,7 +34,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
# Anons don't get a watchlist
if( $this->getUser()->isAnon() ) {
- $out->setPageTitle( wfMsg( 'watchnologin' ) );
+ $out->setPageTitleMsg( 'watchnologin' );
$llink = Linker::linkKnown(
SpecialPage::getTitleFor( 'Userlogin' ),
wfMsgHtml( 'loginreqlink' ),
@@ -75,7 +75,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
// Pass on to the raw editor, from which it's very easy to clear.
case self::EDIT_RAW:
- $out->setPageTitle( wfMsg( 'watchlistedit-raw-title' ) );
+ $out->setPageTitleMsg( 'watchlistedit-raw-title' );
$form = $this->getRawForm();
if( $form->show() ){
$out->addHTML( $this->successMessage );
@@ -85,7 +85,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
case self::EDIT_NORMAL:
default:
- $out->setPageTitle( wfMsg( 'watchlistedit-normal-title' ) );
+ $out->setPageTitleMsg( 'watchlistedit-normal-title' );
$form = $this->getNormalForm();
if( $form->show() ){
$out->addHTML( $this->successMessage );
diff --git a/includes/specials/SpecialEmailuser.php b/includes/specials/SpecialEmailuser.php
index b3585ae69d59..40b627b2d847 100644
--- a/includes/specials/SpecialEmailuser.php
+++ b/includes/specials/SpecialEmailuser.php
@@ -135,11 +135,11 @@ class SpecialEmailUser extends UnlistedSpecialPage {
return false;
}
- $out->setPageTitle( wfMsg( 'emailpage' ) );
+ $out->setPageTitleMsg( 'emailpage' );
$result = $form->show();
if( $result === true || ( $result instanceof Status && $result->isGood() ) ) {
- $out->setPageTitle( wfMsg( 'emailsent' ) );
+ $out->setPageTitleMsg( 'emailsent' );
$out->addWikiMsg( 'emailsenttext' );
$out->returnToMain( false, $this->mTargetObj->getUserPage() );
}
diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php
index f201a71a0a8e..27c5495cf559 100644
--- a/includes/specials/SpecialMergeHistory.php
+++ b/includes/specials/SpecialMergeHistory.php
@@ -167,9 +167,6 @@ class SpecialMergeHistory extends SpecialPage {
}
private function showHistory() {
- $out = $this->getOutput();
- $out->setPageTitle( wfMsg( 'mergehistory' ) );
-
$this->showMergeForm();
# List all stored revisions
@@ -178,6 +175,7 @@ class SpecialMergeHistory extends SpecialPage {
);
$haveRevisions = $revisions && $revisions->getNumRows() > 0;
+ $out = $this->getOutput();
$titleObj = $this->getTitle();
$action = $titleObj->getLocalURL( array( 'action' => 'submit' ) );
# Start the form here
diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php
index 8b8369b56860..45f293f49df6 100644
--- a/includes/specials/SpecialRecentchangeslinked.php
+++ b/includes/specials/SpecialRecentchangeslinked.php
@@ -75,7 +75,7 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges {
return false;
}
- $this->getOutput()->setPageTitle( wfMsg( 'recentchangeslinked-title', $title->getPrefixedText() ) );
+ $this->getOutput()->setPageTitleMsg( 'recentchangeslinked-title', $title->getPrefixedText() );
/*
* Ordinary links are in the pagelinks table, while transclusions are
diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php
index bdd7681a35e6..7b198706485a 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -435,8 +435,8 @@ class SpecialSearch extends SpecialPage {
$this->searchAdvanced = ($this->profile === 'advanced');
$out = $this->getOutput();
if( strval( $term ) !== '' ) {
- $out->setPageTitle( wfMsg( 'searchresults') );
- $out->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'searchresults-title', $term ) ) );
+ $out->setPageTitleMsg( 'searchresults' );
+ $out->setHTMLTitleMsg( 'pagetitle', wfMsg( 'searchresults-title', $term ) );
}
// add javascript specific to special:search
$out->addModules( 'mediawiki.special.search' );
diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php
index 35d4e6426400..358843d585ef 100644
--- a/includes/specials/SpecialTags.php
+++ b/includes/specials/SpecialTags.php
@@ -40,7 +40,7 @@ class SpecialTags extends SpecialPage {
$this->outputHeader();
$out = $this->getOutput();
- $out->setPageTitle( wfMsg( 'tags-title' ) );
+ $out->setPageTitleMsg( 'tags-title' );
$out->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 'tags-intro' );
// Write the headers
diff --git a/includes/specials/SpecialUnblock.php b/includes/specials/SpecialUnblock.php
index 228102d22923..e9a59cd47459 100644
--- a/includes/specials/SpecialUnblock.php
+++ b/includes/specials/SpecialUnblock.php
@@ -53,7 +53,7 @@ class SpecialUnblock extends SpecialPage {
$this->outputHeader();
$out = $this->getOutput();
- $out->setPageTitle( wfMsg( 'unblockip' ) );
+ $out->setPageTitleMsg( 'unblockip' );
$out->addModules( 'mediawiki.special' );
$form = new HTMLForm( $this->getFields(), $this->getContext() );
diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php
index 8f3542f4337b..5ee965ece5fd 100644
--- a/includes/specials/SpecialUndelete.php
+++ b/includes/specials/SpecialUndelete.php
@@ -648,9 +648,9 @@ class SpecialUndelete extends SpecialPage {
$out = $this->getOutput();
if ( $this->mAllowed ) {
- $out->setPageTitle( wfMsg( 'undeletepage' ) );
+ $out->setPageTitleMsg( 'undeletepage' );
} else {
- $out->setPageTitle( wfMsg( 'viewdeletedpage' ) );
+ $out->setPageTitleMsg( 'viewdeletedpage' );
}
if( $par != '' ) {
@@ -801,7 +801,7 @@ class SpecialUndelete extends SpecialPage {
}
}
- $out->setPageTitle( wfMsg( 'undeletepage' ) );
+ $out->setPageTitleMsg( 'undeletepage' );
if( $this->mDiff ) {
$previousRev = $archive->getPreviousRevision( $timestamp );
@@ -1015,9 +1015,9 @@ class SpecialUndelete extends SpecialPage {
$out = $this->getOutput();
if( $this->mAllowed ) {
$out->addModules( 'mediawiki.special.undelete' );
- $out->setPageTitle( wfMsg( 'undeletepage' ) );
+ $out->setPageTitleMsg( 'undeletepage' );
} else {
- $out->setPageTitle( wfMsg( 'viewdeletedpage' ) );
+ $out->setPageTitleMsg( 'viewdeletedpage' );
}
$out->wrapWikiMsg(
"<div class='mw-undelete-pagetitle'>\n$1\n</div>\n",
diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php
index 3f1ecf8c5727..f73bfb7dcd3b 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -189,7 +189,7 @@ class LoginForm extends SpecialPage {
$u->addNewUserLogEntry( true, $this->mReason );
$out = $this->getOutput();
- $out->setPageTitle( $this->msg( 'accmailtitle' )->text() );
+ $out->setPageTitleMsg( 'accmailtitle' );
if( !$result->isGood() ) {
$this->mainLoginForm( $this->msg( 'mailerror', $result->getWikiText() )->text() );
@@ -251,7 +251,7 @@ class LoginForm extends SpecialPage {
}
} else {
# Confirm that the account was created
- $out->setPageTitle( $this->msg( 'accountcreated' )->text() );
+ $out->setPageTitleMsg( 'accountcreated' );
$out->addWikiMsg( 'accountcreatedtext', $u->getName() );
$out->returnToMain( false, $this->getTitle() );
wfRunHooks( 'AddNewAccount', array( $u, false ) );
@@ -883,7 +883,7 @@ class LoginForm extends SpecialPage {
*/
private function displaySuccessfulLogin( $msgname, $injected_html ) {
$out = $this->getOutput();
- $out->setPageTitle( $this->msg( 'loginsuccesstitle' )->text() );
+ $out->setPageTitleMsg( 'loginsuccesstitle' );
if( $msgname ){
$out->addWikiMsg( $msgname, wfEscapeWikiText( $this->getUser()->getName() ) );
}
@@ -914,7 +914,7 @@ class LoginForm extends SpecialPage {
# out.
$out = $this->getOutput();
- $out->setPageTitle( $this->msg( 'cantcreateaccounttitle' )->text() );
+ $out->setPageTitleMsg( 'cantcreateaccounttitle' );
$block_reason = $block->mReason;
if ( strval( $block_reason ) === '' ) {
@@ -1077,9 +1077,9 @@ class LoginForm extends SpecialPage {
// Changes the title depending on permissions for creating account
$out = $this->getOutput();
if ( $user->isAllowed( 'createaccount' ) ) {
- $out->setPageTitle( $this->msg( 'userlogin' )->text() );
+ $out->setPageTitleMsg( 'userlogin' );
} else {
- $out->setPageTitle( $this->msg( 'userloginnocreate' )->text() );
+ $out->setPageTitleMsg( 'userloginnocreate' );
}
$out->disallowUserJs(); // just in case...
diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php
index 51086bb1b3b8..3c63f2ac4db8 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -55,7 +55,7 @@ class SpecialWatchlist extends SpecialPage {
# Anons don't get a watchlist
if( $user->isAnon() ) {
- $output->setPageTitle( wfMsg( 'watchnologin' ) );
+ $output->setPageTitleMsg( 'watchnologin' );
$llink = Linker::linkKnown(
SpecialPage::getTitleFor( 'Userlogin' ),
wfMsgHtml( 'loginreqlink' ),
diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php
index 2b92209b03ec..1606bdfdccc5 100644
--- a/includes/specials/SpecialWhatlinkshere.php
+++ b/includes/specials/SpecialWhatlinkshere.php
@@ -86,7 +86,7 @@ class SpecialWhatLinksHere extends SpecialPage {
$this->selfTitle = $this->getTitle( $this->target->getPrefixedDBkey() );
- $out->setPageTitle( wfMsg( 'whatlinkshere-title', $this->target->getPrefixedText() ) );
+ $out->setPageTitleMsg( 'whatlinkshere-title', $this->target->getPrefixedText() );
$out->setSubtitle( wfMsg( 'whatlinkshere-backlink', Linker::link( $this->target, $this->target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) );
$this->showIndirectLinks( 0, $this->target, $opts->getValue( 'limit' ),