* Removed OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() and make OutputPage::setPageTitle() and OutputPage::setHTMLTitle() accept a Message object
* Updated core calls (including some that I missed last time because of non-matching case)
* Added Message::setContext() and use it in RequestContext so that I don't need to duplicate the call in OutputPage
* Yes, I'm calling $this->msg() on places and then setting the context one more time in OutputPage::setPageTitle() or OutputPage::setHTMLTitle(), but at least I won't be confused about which objects $
return;
}
- $wgOut->setPagetitle( wfMsg( 'delete-confirm', $this->getTitle()->getPrefixedText() ) );
+ $wgOut->setPageTitle( wfMessage( 'delete-confirm', $this->getTitle()->getPrefixedText() ) );
# Better double-check that it hasn't been deleted yet!
$dbw = wfGetDB( DB_MASTER );
if ( $this->mPage->doDeleteArticle( $reason, $suppress, $id, $error ) ) {
$deleted = $this->getTitle()->getPrefixedText();
- $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
+ $wgOut->setPageTitle( wfMessage( 'actioncomplete' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$loglink = '[[Special:Log/delete|' . wfMsgNoTrans( 'deletionlog' ) . ']]';
global $wgOut;
$wgOut->setRobotPolicy( 'noindex,nofollow' );
if ( $this->isConflict ) {
- $wgOut->setPageTitleMsg( 'editconflict', $this->getContextTitle()->getPrefixedText() );
+ $wgOut->setPageTitle( wfMessage( 'editconflict', $this->getContextTitle()->getPrefixedText() ) );
} elseif ( $this->section != '' ) {
$msg = $this->section == 'new' ? 'editingcomment' : 'editingsection';
- $wgOut->setPageTitleMsg( $msg, $this->getContextTitle()->getPrefixedText() );
+ $wgOut->setPageTitle( wfMessage( $msg, $this->getContextTitle()->getPrefixedText() ) );
} else {
# Use the title defined by DISPLAYTITLE magic word when present
if ( isset( $this->mParserOutput )
} else {
$title = $this->getContextTitle()->getPrefixedText();
}
- $wgOut->setPageTitleMsg( 'editing', $title );
+ $wgOut->setPageTitle( wfMessage( 'editing', $title ) );
}
}
array( 'returnto' => $this->getContextTitle()->getPrefixedText() )
);
- $wgOut->setPageTitleMsg( 'whitelistedittitle' );
+ $wgOut->setPageTitle( wfMessage( 'whitelistedittitle' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
function noSuchSectionPage() {
global $wgOut;
- $wgOut->setPageTitleMsg( 'nosuchsectiontitle' );
+ $wgOut->setPageTitle( wfMessage( 'nosuchsectiontitle' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
static function spamPage( $match = false ) {
global $wgOut, $wgTitle;
- $wgOut->setPageTitleMsg( 'spamprotectiontitle' );
+ $wgOut->setPageTitle( wfMessage( 'spamprotectiontitle' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
global $wgOut;
$this->textbox2 = $this->textbox1;
- $wgOut->setPageTitleMsg( 'spamprotectiontitle' );
+ $wgOut->setPageTitle( wfMessage( 'spamprotectiontitle' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
function noCreatePermission() {
global $wgOut;
- $wgOut->setPageTitleMsg( 'nocreatetitle' );
+ $wgOut->setPageTitle( wfMessage( 'nocreatetitle' ) );
$wgOut->addWikiMsg( 'nocreatetext' );
}
$wgOut->addHTML( '</span>' );
}
if( $status->ok ) {
- $wgOut->setPageTitleMsg( 'actioncomplete' );
+ $wgOut->setPageTitle( wfMessage( '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
*/
private function setHeaders() {
global $wgOut;
- $wgOut->setPageTitleMsg( 'filedelete', $this->title->getText() );
+ $wgOut->setPageTitle( wfMessage( 'filedelete', $this->title->getText() ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setSubtitle( wfMsg(
'filedelete-backlink',
*/
function showError( $description ) {
global $wgOut;
- $wgOut->setPageTitle( wfMsg( 'internalerror' ) );
+ $wgOut->setPageTitle( wfMessage( 'internalerror' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
$wgOut->enableClientCache( false );
return $this;
}
+ /**
+ * Set the language and the title from a context object
+ *
+ * @param $context IContextSource
+ * @return Message: $this
+ */
+ public function setContext( IContextSource $context ) {
+ $this->inLanguage( $context->getLang() );
+ $this->title( $context->getTitle() );
+
+ return $this;
+ }
+
/**
* Request the message in any language that is supported.
* As a side effect interface message status is unconditionally
* @param $name string
*/
public function setHTMLTitle( $name ) {
- $this->mHTMLtitle = $name;
- }
-
- /**
- * 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() );
+ if ( $name instanceof Message ) {
+ $this->mHTMLtitle = $name->setContext( $this->getContext() )->text();
+ } else {
+ $this->mHTMLtitle = $name;
+ }
}
/**
* This function automatically sets \<title\> to the same content as \<h1\> but with all tags removed.
* Bad tags that were escaped in \<h1\> will still be escaped in \<title\>, and good tags like \<i\> will be dropped entirely.
*
- * @param $name string
+ * @param $name string|Message
*/
public function setPageTitle( $name ) {
+ if ( $name instanceof Message ) {
+ $name = $name->setContext( $this->getContext() )->text();
+ }
+
# change "<script>foo&bar</script>" to "<script>foo&bar</script>"
# but leave "<i>foobar</i>" alone
$nameWithTags = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $name ) );
$this->mPagetitle = $nameWithTags;
# change "<i>foo&bar</i>" to "foo&bar"
- $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() );
+ $this->setHTMLTitle( $this->msg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ) );
}
/**
if ( $this->getTitle() ) {
$this->mDebugtext .= 'Original title: ' . $this->getTitle()->getPrefixedText() . "\n";
}
- $this->setPageTitleMsg( $title );
- $this->setHTMLTitleMsg( 'errorpagetitle' );
+ $this->setPageTitle( $this->msg( $title ) );
+ $this->setHTMLTitle( $this->msg( 'errorpagetitle' ) );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
$this->enableClientCache( false );
public function showPermissionsErrorPage( $errors, $action = null ) {
$this->mDebugtext .= 'Original title: ' .
$this->getTitle()->getPrefixedText() . "\n";
- $this->setPageTitleMsg( 'permissionserrors' );
- $this->setHTMLTitleMsg( 'permissionserrors' );
+ $this->setPageTitle( $this->msg( 'permissionserrors' ) );
+ $this->setHTMLTitle( $this->msg('permissionserrors' ) );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
$this->enableClientCache( false );
* @param $version Mixed: the version of MediaWiki needed to use the page
*/
public function versionRequired( $version ) {
- $this->setPageTitleMsg( 'versionrequired' );
- $this->setHTMLTitleMsg( 'versionrequired', $version );
+ $this->setPageTitle( $this->msg( 'versionrequired' ) );
+ $this->setHTMLTitle( $this->msg( 'versionrequired', $version ) );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
$this->mBodytext = '';
throw new PermissionsError( 'read' );
}
- $this->setPageTitleMsg( 'loginreqtitle' );
- $this->setHTMLTitleMsg( 'errorpagetitle' );
+ $this->setPageTitle( $this->msg( 'loginreqtitle' ) );
+ $this->setHTMLTitle( $this->msg( 'errorpagetitle' ) );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
if ( !empty( $reasons ) ) {
// Permissions error
if( $source ) {
- $this->setPageTitleMsg( 'viewsource' );
+ $this->setPageTitle( $this->msg( 'viewsource' ) );
$this->setSubtitle(
$this->msg( 'viewsourcefor', Linker::linkKnown( $this->getTitle() ) )->text()
);
} else {
- $this->setPageTitleMsg( 'badaccess' );
+ $this->setPageTitle( $this->msg( 'badaccess' ) );
}
$this->addWikiText( $this->formatPermissionsErrorMessage( $reasons, $action ) );
} else {
}
public function showFatalError( $message ) {
- $this->setPageTitleMsg( 'internalerror' );
+ $this->setPageTitle( $this->msg( 'internalerror' ) );
$this->setRobotPolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
$this->enableClientCache( false );
$ret = Html::htmlHeader( array( 'lang' => $this->getLang()->getCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) );
if ( $this->getHTMLTitle() == '' ) {
- $this->setHTMLTitleMsg( 'pagetitle', $this->getPageTitle() );
+ $this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() ) );
}
$openHead = Html::openElement( 'head' );
}
$titleLink = Linker::link( $this->mTitle );
- $wgOut->setPageTitleMsg( 'protect-title', $this->mTitle->getPrefixedText() );
+ $wgOut->setPageTitle( wfMessage( '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
$return = SpecialPage::getTitleFor( $returnto );
if ( in_array( array( 'markedaspatrollederror-noautopatrol' ), $errors ) ) {
- $this->getOutput()->setPageTitleMsg( 'markedaspatrollederror' );
+ $this->getOutput()->setPageTitle( $this->msg( 'markedaspatrollederror' ) );
$this->getOutput()->addWikiMsg( 'markedaspatrollederror-noautopatrol' );
$this->getOutput()->returnToMain( null, $return );
return;
}
# Inform the user
- $this->getOutput()->setPageTitleMsg( 'markedaspatrolled' );
+ $this->getOutput()->setPageTitle( $this->msg( 'markedaspatrolled' ) );
$this->getOutput()->addWikiMsg( 'markedaspatrolledtext', $rc->getTitle()->getPrefixedText() );
$this->getOutput()->returnToMain( null, $return );
}
}
if ( isset( $result[0][0] ) && ( $result[0][0] == 'alreadyrolled' || $result[0][0] == 'cantrollback' ) ) {
- $this->getOutput()->setPageTitleMsg( 'rollbackfailed' );
+ $this->getOutput()->setPageTitle( $this->msg( 'rollbackfailed' ) );
$errArray = $result[0];
$errMsg = array_shift( $errArray );
$this->getOutput()->addWikiMsgArray( $errMsg, $errArray );
$current = $details['current'];
$target = $details['target'];
$newId = $details['newid'];
- $this->getOutput()->setPageTitleMsg( 'actioncomplete' );
+ $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) );
$this->getOutput()->setRobotPolicy( 'noindex,nofollow' );
if ( $current->getUserText() === '' ) {
*/
public function msg() {
$args = func_get_args();
- return call_user_func_array( 'wfMessage', $args )->inLanguage( $this->getLang() )->title( $this->getTitle() );
+ return call_user_func_array( 'wfMessage', $args )->setContext( $this );
}
/** Static methods **/
$d = wfMsgExt( 'missingarticle-diff', array( 'escape' ),
$this->deletedIdMarker( $this->mOldid ),
$this->deletedIdMarker( $this->mNewid ) );
- $wgOut->setPagetitle( wfMsg( 'errorpagetitle' ) );
+ $wgOut->setPageTitle( wfMessage( 'errorpagetitle' ) );
$wgOut->addWikiMsg( 'missing-article', "<nowiki>$t</nowiki>", "<span class='plainlinks'>$d</span>" );
wfProfileOut( __METHOD__ );
return;
$namespaces = $wgContLang->getNamespaces();
- $out->setPagetitle(
+ $out->setPageTitle(
( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ?
- wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) :
- wfMsg( 'allarticles' )
+ $this->msg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) :
+ $this->msg( 'allarticles' )
);
$out->addModuleStyles( 'mediawiki.special' );
$this->outputHeader();
$out = $this->getOutput();
- $out->setPageTitleMsg( 'blockip-title' );
+ $out->setPageTitle( $this->msg( 'blockip-title' ) );
$out->addModules( array( 'mediawiki.special', 'mediawiki.special.block' ) );
$fields = $this->getFormFields();
$this->doPostText( $form );
if( $form->show() ){
- $out->setPageTitleMsg( 'blockipsuccesssub' );
+ $out->setPageTitle( $this->msg( 'blockipsuccesssub' ) );
$out->addWikiMsg( 'blockipsuccesstext', $this->target );
}
}
$this->setHeaders();
$this->outputHeader();
$out = $this->getOutput();
- $out->setPageTitleMsg( 'ipblocklist' );
+ $out->setPageTitle( $this->msg( 'ipblocklist' ) );
$out->addModuleStyles( 'mediawiki.special' );
$request = $this->getRequest();
if( $this->opts['contribs'] != 'newbie' ) {
$target = $nt->getText();
$out->setSubtitle( $this->contributionsSub( $nt, $id ) );
- $out->setHTMLTitleMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) );
+ $out->setHTMLTitle( $this->msg( '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->setHTMLTitleMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) );
+ $out->setHTMLTitle( $this->msg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
}
if( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
$request = $this->getRequest();
$out = $this->getOutput();
- $out->setPageTitleMsg( 'deletedcontributions-title' );
+ $out->setPageTitle( $this->msg( 'deletedcontributions-title' ) );
$options = array();
# Anons don't get a watchlist
if( $this->getUser()->isAnon() ) {
- $out->setPageTitleMsg( 'watchnologin' );
+ $out->setPageTitle( $this->msg( 'watchnologin' ) );
$llink = Linker::linkKnown(
SpecialPage::getTitleFor( 'Userlogin' ),
wfMsgHtml( 'loginreqlink' ),
// Pass on to the raw editor, from which it's very easy to clear.
case self::EDIT_RAW:
- $out->setPageTitleMsg( 'watchlistedit-raw-title' );
+ $out->setPageTitle( $this->msg( 'watchlistedit-raw-title' ) );
$form = $this->getRawForm();
if( $form->show() ){
$out->addHTML( $this->successMessage );
case self::EDIT_NORMAL:
default:
- $out->setPageTitleMsg( 'watchlistedit-normal-title' );
+ $out->setPageTitle( $this->msg( 'watchlistedit-normal-title' ) );
$form = $this->getNormalForm();
if( $form->show() ){
$out->addHTML( $this->successMessage );
return false;
}
- $out->setPageTitleMsg( 'emailpage' );
+ $out->setPageTitle( $this->msg( 'emailpage' ) );
$result = $form->show();
if( $result === true || ( $result instanceof Status && $result->isGood() ) ) {
- $out->setPageTitleMsg( 'emailsent' );
+ $out->setPageTitle( $this->msg( 'emailsent' ) );
$out->addWikiMsg( 'emailsenttext' );
$out->returnToMain( false, $this->mTargetObj->getUserPage() );
}
$oldTitleLink = Linker::link( $this->oldTitle );
$out = $this->getOutput();
- $out->setPagetitle( wfMsg( 'move-page', $this->oldTitle->getPrefixedText() ) );
+ $out->setPageTitle( $this->msg( 'move-page', $this->oldTitle->getPrefixedText() ) );
$out->addModules( 'mediawiki.special.movePage' );
$newTitle = $this->newTitle;
$namespace = (int)$ns; // if no namespace given, use 0 (NS_MAIN).
$namespaces = $wgContLang->getNamespaces();
- $out->setPagetitle(
+ $out->setPageTitle(
( $namespace > 0 && in_array( $namespace, array_keys( $namespaces ) ) )
- ? wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) )
- : wfMsg( 'prefixindex' )
+ ? $this->msg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) )
+ : $this->msg( 'prefixindex' )
);
$showme = '';
return false;
}
- $this->getOutput()->setPageTitleMsg( 'recentchangeslinked-title', $title->getPrefixedText() );
+ $this->getOutput()->setPageTitle( $this->msg( 'recentchangeslinked-title', $title->getPrefixedText() ) );
/*
* Ordinary links are in the pagelinks table, while transclusions are
* Report that the submit operation succeeded
*/
protected function success() {
- $this->getOutput()->setPagetitle( wfMsg( 'actioncomplete' ) );
+ $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) );
$this->getOutput()->wrapWikiMsg( "<span class=\"success\">\n$1\n</span>", $this->typeInfo['success'] );
$this->list->reloadFromMaster();
$this->showForm();
* Report that the submit operation failed
*/
protected function failure( $status ) {
- $this->getOutput()->setPagetitle( wfMsg( 'actionfailed' ) );
+ $this->getOutput()->setPageTitle( $this->msg( 'actionfailed' ) );
$this->getOutput()->addWikiText( $status->getWikiText( $this->typeInfo['failure'] ) );
$this->showForm();
}
$this->searchAdvanced = ($this->profile === 'advanced');
$out = $this->getOutput();
if( strval( $term ) !== '' ) {
- $out->setPageTitleMsg( 'searchresults' );
- $out->setHTMLTitleMsg( 'pagetitle', wfMsg( 'searchresults-title', $term ) );
+ $out->setPageTitle( $this->msg( 'searchresults' ) );
+ $out->setHTMLTitle( $this->msg( 'pagetitle', $this->msg( 'searchresults-title', $term )->plain() ) );
}
// add javascript specific to special:search
$out->addModules( 'mediawiki.special.search' );
$this->outputHeader();
$out = $this->getOutput();
- $out->setPageTitleMsg( 'tags-title' );
+ $out->setPageTitle( $this->msg( 'tags-title' ) );
$out->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 'tags-intro' );
// Write the headers
$this->outputHeader();
$out = $this->getOutput();
- $out->setPageTitleMsg( 'unblockip' );
+ $out->setPageTitle( $this->msg( 'unblockip' ) );
$out->addModules( 'mediawiki.special' );
$form = new HTMLForm( $this->getFields(), $this->getContext() );
$out = $this->getOutput();
if ( $this->mAllowed ) {
- $out->setPageTitleMsg( 'undeletepage' );
+ $out->setPageTitle( $this->msg( 'undeletepage' ) );
} else {
- $out->setPageTitleMsg( 'viewdeletedpage' );
+ $out->setPageTitle( $this->msg( 'viewdeletedpage' ) );
}
if( $par != '' ) {
}
}
- $out->setPageTitleMsg( 'undeletepage' );
+ $out->setPageTitle( $this->msg( 'undeletepage' ) );
if( $this->mDiff ) {
$previousRev = $archive->getPreviousRevision( $timestamp );
$out = $this->getOutput();
if( $this->mAllowed ) {
$out->addModules( 'mediawiki.special.undelete' );
- $out->setPageTitleMsg( 'undeletepage' );
+ $out->setPageTitle( $this->msg( 'undeletepage' ) );
} else {
- $out->setPageTitleMsg( 'viewdeletedpage' );
+ $out->setPageTitle( $this->msg( 'viewdeletedpage' ) );
}
$out->wrapWikiMsg(
"<div class='mw-undelete-pagetitle'>\n$1\n</div>\n",
$u->addNewUserLogEntry( true, $this->mReason );
$out = $this->getOutput();
- $out->setPageTitleMsg( 'accmailtitle' );
+ $out->setPageTitle( $this->msg( 'accmailtitle' ) );
if( !$result->isGood() ) {
$this->mainLoginForm( $this->msg( 'mailerror', $result->getWikiText() )->text() );
}
} else {
# Confirm that the account was created
- $out->setPageTitleMsg( 'accountcreated' );
+ $out->setPageTitle( $this->msg( 'accountcreated' ) );
$out->addWikiMsg( 'accountcreatedtext', $u->getName() );
$out->returnToMain( false, $this->getTitle() );
wfRunHooks( 'AddNewAccount', array( $u, false ) );
*/
private function displaySuccessfulLogin( $msgname, $injected_html ) {
$out = $this->getOutput();
- $out->setPageTitleMsg( 'loginsuccesstitle' );
+ $out->setPageTitle( $this->msg( 'loginsuccesstitle' ) );
if( $msgname ){
$out->addWikiMsg( $msgname, wfEscapeWikiText( $this->getUser()->getName() ) );
}
# out.
$out = $this->getOutput();
- $out->setPageTitleMsg( 'cantcreateaccounttitle' );
+ $out->setPageTitle( $this->msg( 'cantcreateaccounttitle' ) );
$block_reason = $block->mReason;
if ( strval( $block_reason ) === '' ) {
// Changes the title depending on permissions for creating account
$out = $this->getOutput();
if ( $user->isAllowed( 'createaccount' ) ) {
- $out->setPageTitleMsg( 'userlogin' );
+ $out->setPageTitle( $this->msg( 'userlogin' ) );
} else {
- $out->setPageTitleMsg( 'userloginnocreate' );
+ $out->setPageTitle( $this->msg( 'userloginnocreate' ) );
}
$out->disallowUserJs(); // just in case...
# Anons don't get a watchlist
if( $user->isAnon() ) {
- $output->setPageTitleMsg( 'watchnologin' );
+ $output->setPageTitle( $this->msg( 'watchnologin' ) );
$llink = Linker::linkKnown(
SpecialPage::getTitleFor( 'Userlogin' ),
wfMsgHtml( 'loginreqlink' ),
$this->selfTitle = $this->getTitle( $this->target->getPrefixedDBkey() );
- $out->setPageTitleMsg( 'whatlinkshere-title', $this->target->getPrefixedText() );
+ $out->setPageTitle( $this->msg( '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' ),