Added OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() as modified versions of OutputPage::setPageTitle() and OutputPage::setHTMLTitle() that take an message name and its parameters; updated all calls in core that can use the two new functions
This commit is contained in:
parent
109e5113c0
commit
ae45908c59
21 changed files with 84 additions and 63 deletions
|
|
@ -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' );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -760,6 +760,19 @@ class OutputPage extends ContextSource {
|
|||
$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() );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the "HTML title", i.e. the content of the <title> tag.
|
||||
*
|
||||
|
|
@ -784,7 +797,20 @@ class OutputPage extends ContextSource {
|
|||
$this->mPagetitle = $nameWithTags;
|
||||
|
||||
# change "<i>foo&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' );
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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() === '' ) {
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
|
|
@ -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 !== '' ) {
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
|
|
@ -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 );
|
||||
|
|
|
|||
|
|
@ -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() );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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' );
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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() );
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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...
|
||||
|
|
|
|||
|
|
@ -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' ),
|
||||
|
|
|
|||
|
|
@ -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' ),
|
||||
|
|
|
|||
Loading…
Reference in a new issue