Added OutputPage::setPageTitleMsg() and OutputPage::setHTMLTitleMsg() as modified...
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 24 Oct 2011 17:24:38 +0000 (17:24 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 24 Oct 2011 17:24:38 +0000 (17:24 +0000)
21 files changed:
includes/EditPage.php
includes/FileDeleteForm.php
includes/OutputPage.php
includes/ProtectionForm.php
includes/actions/MarkpatrolledAction.php
includes/actions/RollbackAction.php
includes/specials/SpecialBlock.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialEmailuser.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialRecentchangeslinked.php
includes/specials/SpecialSearch.php
includes/specials/SpecialTags.php
includes/specials/SpecialUnblock.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUserlogin.php
includes/specials/SpecialWatchlist.php
includes/specials/SpecialWhatlinkshere.php

index f84e0a5..7c4221a 100644 (file)
@@ -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' );
        }
 
index ca195d8..e70d551 100644 (file)
@@ -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',
index 3df9dff..ad5db3c 100644 (file)
@@ -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&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' );
index 9771493..4d90808 100644 (file)
@@ -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
index a5d7662..0ac5293 100644 (file)
@@ -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 );
        }
index 9036ebf..b1d3b19 100644 (file)
@@ -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() === '' ) {
index 9c6674a..25114f8 100644 (file)
@@ -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 );
                }
        }
index c25947d..f6041ca 100644 (file)
@@ -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();
index 307181c..c39f9de 100644 (file)
@@ -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 !== '' ) {
index e97fe4c..752a84f 100644 (file)
@@ -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();
 
index 97d0073..2e2554f 100644 (file)
@@ -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 );
index b3585ae..40b627b 100644 (file)
@@ -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() );
                }
index f201a71..27c5495 100644 (file)
@@ -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
index 8b8369b..45f293f 100644 (file)
@@ -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
index bdd7681..7b19870 100644 (file)
@@ -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' );
index 35d4e64..358843d 100644 (file)
@@ -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
index 228102d..e9a59cd 100644 (file)
@@ -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() );
index 8f3542f..5ee965e 100644 (file)
@@ -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",
index 3f1ecf8..f73bfb7 100644 (file)
@@ -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...
index 51086bb..3c63f2a 100644 (file)
@@ -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' ),
index 2b92209..1606bdf 100644 (file)
@@ -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' ),