Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | } |
226 | 226 | |
227 | 227 | $titleLink = Linker::link( $this->mTitle ); |
228 | | - $wgOut->setPageTitle( wfMsg( 'protect-title', $this->mTitle->getPrefixedText() ) ); |
| 228 | + $wgOut->setPageTitleMsg( 'protect-title', $this->mTitle->getPrefixedText() ); |
229 | 229 | $wgOut->setSubtitle( wfMsg( 'protect-backlink', $titleLink ) ); |
230 | 230 | |
231 | 231 | # Show an appropriate message if the user isn't allowed or able to change |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1360,14 +1360,11 @@ |
1361 | 1361 | function setHeaders() { |
1362 | 1362 | global $wgOut; |
1363 | 1363 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
1364 | | - if ( $this->formtype == 'preview' ) { |
1365 | | - $wgOut->setPageTitleActionText( wfMsg( 'preview' ) ); |
1366 | | - } |
1367 | 1364 | if ( $this->isConflict ) { |
1368 | | - $wgOut->setPageTitle( wfMsg( 'editconflict', $this->getContextTitle()->getPrefixedText() ) ); |
| 1365 | + $wgOut->setPageTitleMsg( 'editconflict', $this->getContextTitle()->getPrefixedText() ); |
1369 | 1366 | } elseif ( $this->section != '' ) { |
1370 | 1367 | $msg = $this->section == 'new' ? 'editingcomment' : 'editingsection'; |
1371 | | - $wgOut->setPageTitle( wfMsg( $msg, $this->getContextTitle()->getPrefixedText() ) ); |
| 1368 | + $wgOut->setPageTitleMsg( $msg, $this->getContextTitle()->getPrefixedText() ); |
1372 | 1369 | } else { |
1373 | 1370 | # Use the title defined by DISPLAYTITLE magic word when present |
1374 | 1371 | if ( isset( $this->mParserOutput ) |
— | — | @@ -1376,7 +1373,7 @@ |
1377 | 1374 | } else { |
1378 | 1375 | $title = $this->getContextTitle()->getPrefixedText(); |
1379 | 1376 | } |
1380 | | - $wgOut->setPageTitle( wfMsg( 'editing', $title ) ); |
| 1377 | + $wgOut->setPageTitleMsg( 'editing', $title ); |
1381 | 1378 | } |
1382 | 1379 | } |
1383 | 1380 | |
— | — | @@ -2229,7 +2226,7 @@ |
2230 | 2227 | array( 'returnto' => $this->getContextTitle()->getPrefixedText() ) |
2231 | 2228 | ); |
2232 | 2229 | |
2233 | | - $wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) ); |
| 2230 | + $wgOut->setPageTitleMsg( 'whitelistedittitle' ); |
2234 | 2231 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2235 | 2232 | $wgOut->setArticleRelated( false ); |
2236 | 2233 | |
— | — | @@ -2244,7 +2241,7 @@ |
2245 | 2242 | function noSuchSectionPage() { |
2246 | 2243 | global $wgOut; |
2247 | 2244 | |
2248 | | - $wgOut->setPageTitle( wfMsg( 'nosuchsectiontitle' ) ); |
| 2245 | + $wgOut->setPageTitleMsg( 'nosuchsectiontitle' ); |
2249 | 2246 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2250 | 2247 | $wgOut->setArticleRelated( false ); |
2251 | 2248 | |
— | — | @@ -2264,7 +2261,7 @@ |
2265 | 2262 | static function spamPage( $match = false ) { |
2266 | 2263 | global $wgOut, $wgTitle; |
2267 | 2264 | |
2268 | | - $wgOut->setPageTitle( wfMsg( 'spamprotectiontitle' ) ); |
| 2265 | + $wgOut->setPageTitleMsg( 'spamprotectiontitle' ); |
2269 | 2266 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2270 | 2267 | $wgOut->setArticleRelated( false ); |
2271 | 2268 | |
— | — | @@ -2287,7 +2284,7 @@ |
2288 | 2285 | global $wgOut; |
2289 | 2286 | $this->textbox2 = $this->textbox1; |
2290 | 2287 | |
2291 | | - $wgOut->setPageTitle( wfMsg( 'spamprotectiontitle' ) ); |
| 2288 | + $wgOut->setPageTitleMsg( 'spamprotectiontitle' ); |
2292 | 2289 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2293 | 2290 | $wgOut->setArticleRelated( false ); |
2294 | 2291 | |
— | — | @@ -2848,7 +2845,7 @@ |
2849 | 2846 | |
2850 | 2847 | function noCreatePermission() { |
2851 | 2848 | global $wgOut; |
2852 | | - $wgOut->setPageTitle( wfMsg( 'nocreatetitle' ) ); |
| 2849 | + $wgOut->setPageTitleMsg( 'nocreatetitle' ); |
2853 | 2850 | $wgOut->addWikiMsg( 'nocreatetext' ); |
2854 | 2851 | } |
2855 | 2852 | |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -761,6 +761,19 @@ |
762 | 762 | } |
763 | 763 | |
764 | 764 | /** |
| 765 | + * Same as setHTMLTitle(), but takes a message name and parameter instead |
| 766 | + * of directly the string to display. |
| 767 | + * |
| 768 | + * @since 1.19 |
| 769 | + * @param $name String message name |
| 770 | + * @param $args Array|String message parameters, if there's only one |
| 771 | + * parameter it can be passed directly as a string. |
| 772 | + */ |
| 773 | + public function setHTMLTitleMsg( $name, $args = array() ) { |
| 774 | + $this->setHTMLTitle( $this->msg( $name, $args )->text() ); |
| 775 | + } |
| 776 | + |
| 777 | + /** |
765 | 778 | * Return the "HTML title", i.e. the content of the <title> tag. |
766 | 779 | * |
767 | 780 | * @return String |
— | — | @@ -784,10 +797,23 @@ |
785 | 798 | $this->mPagetitle = $nameWithTags; |
786 | 799 | |
787 | 800 | # change "<i>foo&bar</i>" to "foo&bar" |
788 | | - $this->setHTMLTitle( $this->msg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) )->text() ); |
| 801 | + $this->setHTMLTitleMsg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ); |
789 | 802 | } |
790 | 803 | |
791 | 804 | /** |
| 805 | + * Same as setPageTitle(), but takes a message name and parameter instead |
| 806 | + * of directly the string to display. |
| 807 | + * |
| 808 | + * @since 1.19 |
| 809 | + * @param $name String message name |
| 810 | + * @param $args Array|String message parameters, if there's only one |
| 811 | + * parameter it can be passed directly as a string. |
| 812 | + */ |
| 813 | + public function setPageTitleMsg( $name, $args = array() ) { |
| 814 | + $this->setPageTitle( $this->msg( $name, $args )->text() ); |
| 815 | + } |
| 816 | + |
| 817 | + /** |
792 | 818 | * Return the "page title", i.e. the content of the \<h1\> tag. |
793 | 819 | * |
794 | 820 | * @return String |
— | — | @@ -1927,8 +1953,8 @@ |
1928 | 1954 | if ( $this->getTitle() ) { |
1929 | 1955 | $this->mDebugtext .= 'Original title: ' . $this->getTitle()->getPrefixedText() . "\n"; |
1930 | 1956 | } |
1931 | | - $this->setPageTitle( $this->msg( $title )->text() ); |
1932 | | - $this->setHTMLTitle( $this->msg( 'errorpagetitle' )->text() ); |
| 1957 | + $this->setPageTitleMsg( $title ); |
| 1958 | + $this->setHTMLTitleMsg( 'errorpagetitle' ); |
1933 | 1959 | $this->setRobotPolicy( 'noindex,nofollow' ); |
1934 | 1960 | $this->setArticleRelated( false ); |
1935 | 1961 | $this->enableClientCache( false ); |
— | — | @@ -1953,8 +1979,8 @@ |
1954 | 1980 | public function showPermissionsErrorPage( $errors, $action = null ) { |
1955 | 1981 | $this->mDebugtext .= 'Original title: ' . |
1956 | 1982 | $this->getTitle()->getPrefixedText() . "\n"; |
1957 | | - $this->setPageTitle( $this->msg( 'permissionserrors' )->text() ); |
1958 | | - $this->setHTMLTitle( $this->msg( 'permissionserrors' )->text() ); |
| 1983 | + $this->setPageTitleMsg( 'permissionserrors' ); |
| 1984 | + $this->setHTMLTitleMsg( 'permissionserrors' ); |
1959 | 1985 | $this->setRobotPolicy( 'noindex,nofollow' ); |
1960 | 1986 | $this->setArticleRelated( false ); |
1961 | 1987 | $this->enableClientCache( false ); |
— | — | @@ -1970,8 +1996,8 @@ |
1971 | 1997 | * @param $version Mixed: the version of MediaWiki needed to use the page |
1972 | 1998 | */ |
1973 | 1999 | public function versionRequired( $version ) { |
1974 | | - $this->setPageTitle( $this->msg( 'versionrequired', $version )->text() ); |
1975 | | - $this->setHTMLTitle( $this->msg( 'versionrequired', $version )->text() ); |
| 2000 | + $this->setPageTitleMsg( 'versionrequired' ); |
| 2001 | + $this->setHTMLTitleMsg( 'versionrequired', $version ); |
1976 | 2002 | $this->setRobotPolicy( 'noindex,nofollow' ); |
1977 | 2003 | $this->setArticleRelated( false ); |
1978 | 2004 | $this->mBodytext = ''; |
— | — | @@ -1997,8 +2023,8 @@ |
1998 | 2024 | throw new PermissionsError( 'read' ); |
1999 | 2025 | } |
2000 | 2026 | |
2001 | | - $this->setPageTitle( $this->msg( 'loginreqtitle' )->text() ); |
2002 | | - $this->setHTMLTitle( $this->msg( 'errorpagetitle' )->text() ); |
| 2027 | + $this->setPageTitleMsg( 'loginreqtitle' ); |
| 2028 | + $this->setHTMLTitleMsg( 'errorpagetitle' ); |
2003 | 2029 | $this->setRobotPolicy( 'noindex,nofollow' ); |
2004 | 2030 | $this->setArticleRelated( false ); |
2005 | 2031 | |
— | — | @@ -2090,12 +2116,12 @@ |
2091 | 2117 | if ( !empty( $reasons ) ) { |
2092 | 2118 | // Permissions error |
2093 | 2119 | if( $source ) { |
2094 | | - $this->setPageTitle( $this->msg( 'viewsource' )->text() ); |
| 2120 | + $this->setPageTitleMsg( 'viewsource' ); |
2095 | 2121 | $this->setSubtitle( |
2096 | 2122 | $this->msg( 'viewsourcefor', Linker::linkKnown( $this->getTitle() ) )->text() |
2097 | 2123 | ); |
2098 | 2124 | } else { |
2099 | | - $this->setPageTitle( $this->msg( 'badaccess' )->text() ); |
| 2125 | + $this->setPageTitleMsg( 'badaccess' ); |
2100 | 2126 | } |
2101 | 2127 | $this->addWikiText( $this->formatPermissionsErrorMessage( $reasons, $action ) ); |
2102 | 2128 | } else { |
— | — | @@ -2165,7 +2191,7 @@ |
2166 | 2192 | } |
2167 | 2193 | |
2168 | 2194 | public function showFatalError( $message ) { |
2169 | | - $this->setPageTitle( $this->msg( 'internalerror' )->text() ); |
| 2195 | + $this->setPageTitleMsg( 'internalerror' ); |
2170 | 2196 | $this->setRobotPolicy( 'noindex,nofollow' ); |
2171 | 2197 | $this->setArticleRelated( false ); |
2172 | 2198 | $this->enableClientCache( false ); |
— | — | @@ -2257,7 +2283,7 @@ |
2258 | 2284 | $ret = Html::htmlHeader( array( 'lang' => $this->getLang()->getCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) ); |
2259 | 2285 | |
2260 | 2286 | if ( $this->getHTMLTitle() == '' ) { |
2261 | | - $this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() )->text() ); |
| 2287 | + $this->setHTMLTitleMsg( 'pagetitle', $this->getPageTitle() ); |
2262 | 2288 | } |
2263 | 2289 | |
2264 | 2290 | $openHead = Html::openElement( 'head' ); |
Index: trunk/phase3/includes/actions/MarkpatrolledAction.php |
— | — | @@ -67,7 +67,7 @@ |
68 | 68 | $return = SpecialPage::getTitleFor( $returnto ); |
69 | 69 | |
70 | 70 | if ( in_array( array( 'markedaspatrollederror-noautopatrol' ), $errors ) ) { |
71 | | - $this->getOutput()->setPageTitle( wfMsg( 'markedaspatrollederror' ) ); |
| 71 | + $this->getOutput()->setPageTitleMsg( 'markedaspatrollederror' ); |
72 | 72 | $this->getOutput()->addWikiMsg( 'markedaspatrollederror-noautopatrol' ); |
73 | 73 | $this->getOutput()->returnToMain( null, $return ); |
74 | 74 | return; |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | } |
81 | 81 | |
82 | 82 | # Inform the user |
83 | | - $this->getOutput()->setPageTitle( wfMsg( 'markedaspatrolled' ) ); |
| 83 | + $this->getOutput()->setPageTitleMsg( 'markedaspatrolled' ); |
84 | 84 | $this->getOutput()->addWikiMsg( 'markedaspatrolledtext', $rc->getTitle()->getPrefixedText() ); |
85 | 85 | $this->getOutput()->returnToMain( null, $return ); |
86 | 86 | } |
Index: trunk/phase3/includes/actions/RollbackAction.php |
— | — | @@ -54,7 +54,7 @@ |
55 | 55 | } |
56 | 56 | |
57 | 57 | if ( isset( $result[0][0] ) && ( $result[0][0] == 'alreadyrolled' || $result[0][0] == 'cantrollback' ) ) { |
58 | | - $this->getOutput()->setPageTitle( wfMsg( 'rollbackfailed' ) ); |
| 58 | + $this->getOutput()->setPageTitleMsg( 'rollbackfailed' ); |
59 | 59 | $errArray = $result[0]; |
60 | 60 | $errMsg = array_shift( $errArray ); |
61 | 61 | $this->getOutput()->addWikiMsgArray( $errMsg, $errArray ); |
— | — | @@ -95,7 +95,7 @@ |
96 | 96 | $current = $details['current']; |
97 | 97 | $target = $details['target']; |
98 | 98 | $newId = $details['newid']; |
99 | | - $this->getOutput()->setPageTitle( wfMsg( 'actioncomplete' ) ); |
| 99 | + $this->getOutput()->setPageTitleMsg( 'actioncomplete' ); |
100 | 100 | $this->getOutput()->setRobotPolicy( 'noindex,nofollow' ); |
101 | 101 | |
102 | 102 | if ( $current->getUserText() === '' ) { |
Index: trunk/phase3/includes/FileDeleteForm.php |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | $wgOut->addHTML( '</span>' ); |
80 | 80 | } |
81 | 81 | if( $status->ok ) { |
82 | | - $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) ); |
| 82 | + $wgOut->setPageTitleMsg( 'actioncomplete' ); |
83 | 83 | $wgOut->addHTML( $this->prepareMessage( 'filedelete-success' ) ); |
84 | 84 | // Return to the main page if we just deleted all versions of the |
85 | 85 | // file, otherwise go back to the description page |
— | — | @@ -271,7 +271,7 @@ |
272 | 272 | */ |
273 | 273 | private function setHeaders() { |
274 | 274 | global $wgOut; |
275 | | - $wgOut->setPageTitle( wfMsg( 'filedelete', $this->title->getText() ) ); |
| 275 | + $wgOut->setPageTitleMsg( 'filedelete', $this->title->getText() ); |
276 | 276 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
277 | 277 | $wgOut->setSubtitle( wfMsg( |
278 | 278 | 'filedelete-backlink', |
Index: trunk/phase3/includes/specials/SpecialUnblock.php |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | $this->outputHeader(); |
55 | 55 | |
56 | 56 | $out = $this->getOutput(); |
57 | | - $out->setPageTitle( wfMsg( 'unblockip' ) ); |
| 57 | + $out->setPageTitleMsg( 'unblockip' ); |
58 | 58 | $out->addModules( 'mediawiki.special' ); |
59 | 59 | |
60 | 60 | $form = new HTMLForm( $this->getFields(), $this->getContext() ); |
Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | return false; |
77 | 77 | } |
78 | 78 | |
79 | | - $this->getOutput()->setPageTitle( wfMsg( 'recentchangeslinked-title', $title->getPrefixedText() ) ); |
| 79 | + $this->getOutput()->setPageTitleMsg( 'recentchangeslinked-title', $title->getPrefixedText() ); |
80 | 80 | |
81 | 81 | /* |
82 | 82 | * Ordinary links are in the pagelinks table, while transclusions are |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -648,9 +648,9 @@ |
649 | 649 | $out = $this->getOutput(); |
650 | 650 | |
651 | 651 | if ( $this->mAllowed ) { |
652 | | - $out->setPageTitle( wfMsg( 'undeletepage' ) ); |
| 652 | + $out->setPageTitleMsg( 'undeletepage' ); |
653 | 653 | } else { |
654 | | - $out->setPageTitle( wfMsg( 'viewdeletedpage' ) ); |
| 654 | + $out->setPageTitleMsg( 'viewdeletedpage' ); |
655 | 655 | } |
656 | 656 | |
657 | 657 | if( $par != '' ) { |
— | — | @@ -801,7 +801,7 @@ |
802 | 802 | } |
803 | 803 | } |
804 | 804 | |
805 | | - $out->setPageTitle( wfMsg( 'undeletepage' ) ); |
| 805 | + $out->setPageTitleMsg( 'undeletepage' ); |
806 | 806 | |
807 | 807 | if( $this->mDiff ) { |
808 | 808 | $previousRev = $archive->getPreviousRevision( $timestamp ); |
— | — | @@ -1015,9 +1015,9 @@ |
1016 | 1016 | $out = $this->getOutput(); |
1017 | 1017 | if( $this->mAllowed ) { |
1018 | 1018 | $out->addModules( 'mediawiki.special.undelete' ); |
1019 | | - $out->setPageTitle( wfMsg( 'undeletepage' ) ); |
| 1019 | + $out->setPageTitleMsg( 'undeletepage' ); |
1020 | 1020 | } else { |
1021 | | - $out->setPageTitle( wfMsg( 'viewdeletedpage' ) ); |
| 1021 | + $out->setPageTitleMsg( 'viewdeletedpage' ); |
1022 | 1022 | } |
1023 | 1023 | $out->wrapWikiMsg( |
1024 | 1024 | "<div class='mw-undelete-pagetitle'>\n$1\n</div>\n", |
Index: trunk/phase3/includes/specials/SpecialBlockList.php |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | $this->setHeaders(); |
45 | 45 | $this->outputHeader(); |
46 | 46 | $out = $this->getOutput(); |
47 | | - $out->setPageTitle( wfMsg( 'ipblocklist' ) ); |
| 47 | + $out->setPageTitleMsg( 'ipblocklist' ); |
48 | 48 | $out->addModuleStyles( 'mediawiki.special' ); |
49 | 49 | |
50 | 50 | $request = $this->getRequest(); |
Index: trunk/phase3/includes/specials/SpecialUserlogin.php |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | $u->addNewUserLogEntry( true, $this->mReason ); |
191 | 191 | |
192 | 192 | $out = $this->getOutput(); |
193 | | - $out->setPageTitle( $this->msg( 'accmailtitle' )->text() ); |
| 193 | + $out->setPageTitleMsg( 'accmailtitle' ); |
194 | 194 | |
195 | 195 | if( !$result->isGood() ) { |
196 | 196 | $this->mainLoginForm( $this->msg( 'mailerror', $result->getWikiText() )->text() ); |
— | — | @@ -251,7 +251,7 @@ |
252 | 252 | } |
253 | 253 | } else { |
254 | 254 | # Confirm that the account was created |
255 | | - $out->setPageTitle( $this->msg( 'accountcreated' )->text() ); |
| 255 | + $out->setPageTitleMsg( 'accountcreated' ); |
256 | 256 | $out->addWikiMsg( 'accountcreatedtext', $u->getName() ); |
257 | 257 | $out->returnToMain( false, $this->getTitle() ); |
258 | 258 | wfRunHooks( 'AddNewAccount', array( $u, false ) ); |
— | — | @@ -883,7 +883,7 @@ |
884 | 884 | */ |
885 | 885 | private function displaySuccessfulLogin( $msgname, $injected_html ) { |
886 | 886 | $out = $this->getOutput(); |
887 | | - $out->setPageTitle( $this->msg( 'loginsuccesstitle' )->text() ); |
| 887 | + $out->setPageTitleMsg( 'loginsuccesstitle' ); |
888 | 888 | if( $msgname ){ |
889 | 889 | $out->addWikiMsg( $msgname, wfEscapeWikiText( $this->getUser()->getName() ) ); |
890 | 890 | } |
— | — | @@ -914,7 +914,7 @@ |
915 | 915 | # out. |
916 | 916 | |
917 | 917 | $out = $this->getOutput(); |
918 | | - $out->setPageTitle( $this->msg( 'cantcreateaccounttitle' )->text() ); |
| 918 | + $out->setPageTitleMsg( 'cantcreateaccounttitle' ); |
919 | 919 | |
920 | 920 | $block_reason = $block->mReason; |
921 | 921 | if ( strval( $block_reason ) === '' ) { |
— | — | @@ -1077,9 +1077,9 @@ |
1078 | 1078 | // Changes the title depending on permissions for creating account |
1079 | 1079 | $out = $this->getOutput(); |
1080 | 1080 | if ( $user->isAllowed( 'createaccount' ) ) { |
1081 | | - $out->setPageTitle( $this->msg( 'userlogin' )->text() ); |
| 1081 | + $out->setPageTitleMsg( 'userlogin' ); |
1082 | 1082 | } else { |
1083 | | - $out->setPageTitle( $this->msg( 'userloginnocreate' )->text() ); |
| 1083 | + $out->setPageTitleMsg( 'userloginnocreate' ); |
1084 | 1084 | } |
1085 | 1085 | |
1086 | 1086 | $out->disallowUserJs(); // just in case... |
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | |
88 | 88 | $this->selfTitle = $this->getTitle( $this->target->getPrefixedDBkey() ); |
89 | 89 | |
90 | | - $out->setPageTitle( wfMsg( 'whatlinkshere-title', $this->target->getPrefixedText() ) ); |
| 90 | + $out->setPageTitleMsg( 'whatlinkshere-title', $this->target->getPrefixedText() ); |
91 | 91 | $out->setSubtitle( wfMsg( 'whatlinkshere-backlink', Linker::link( $this->target, $this->target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) ); |
92 | 92 | |
93 | 93 | $this->showIndirectLinks( 0, $this->target, $opts->getValue( 'limit' ), |
Index: trunk/phase3/includes/specials/SpecialEditWatchlist.php |
— | — | @@ -34,7 +34,7 @@ |
35 | 35 | |
36 | 36 | # Anons don't get a watchlist |
37 | 37 | if( $this->getUser()->isAnon() ) { |
38 | | - $out->setPageTitle( wfMsg( 'watchnologin' ) ); |
| 38 | + $out->setPageTitleMsg( 'watchnologin' ); |
39 | 39 | $llink = Linker::linkKnown( |
40 | 40 | SpecialPage::getTitleFor( 'Userlogin' ), |
41 | 41 | wfMsgHtml( 'loginreqlink' ), |
— | — | @@ -75,7 +75,7 @@ |
76 | 76 | // Pass on to the raw editor, from which it's very easy to clear. |
77 | 77 | |
78 | 78 | case self::EDIT_RAW: |
79 | | - $out->setPageTitle( wfMsg( 'watchlistedit-raw-title' ) ); |
| 79 | + $out->setPageTitleMsg( 'watchlistedit-raw-title' ); |
80 | 80 | $form = $this->getRawForm(); |
81 | 81 | if( $form->show() ){ |
82 | 82 | $out->addHTML( $this->successMessage ); |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | |
87 | 87 | case self::EDIT_NORMAL: |
88 | 88 | default: |
89 | | - $out->setPageTitle( wfMsg( 'watchlistedit-normal-title' ) ); |
| 89 | + $out->setPageTitleMsg( 'watchlistedit-normal-title' ); |
90 | 90 | $form = $this->getNormalForm(); |
91 | 91 | if( $form->show() ){ |
92 | 92 | $out->addHTML( $this->successMessage ); |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -84,14 +84,14 @@ |
85 | 85 | if( $this->opts['contribs'] != 'newbie' ) { |
86 | 86 | $target = $nt->getText(); |
87 | 87 | $out->setSubtitle( $this->contributionsSub( $nt, $id ) ); |
88 | | - $out->setHTMLTitle( wfMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ) ); |
| 88 | + $out->setHTMLTitleMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ); |
89 | 89 | $userObj = User::newFromName( $target, false ); |
90 | 90 | if ( is_object( $userObj ) ) { |
91 | 91 | $this->getSkin()->setRelevantUser( $userObj ); |
92 | 92 | } |
93 | 93 | } else { |
94 | 94 | $out->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') ); |
95 | | - $out->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) ); |
| 95 | + $out->setHTMLTitleMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ); |
96 | 96 | } |
97 | 97 | |
98 | 98 | if( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) { |
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php |
— | — | @@ -268,7 +268,7 @@ |
269 | 269 | |
270 | 270 | $request = $this->getRequest(); |
271 | 271 | $out = $this->getOutput(); |
272 | | - $out->setPageTitle( wfMsgExt( 'deletedcontributions-title', array( 'parsemag' ) ) ); |
| 272 | + $out->setPageTitleMsg( 'deletedcontributions-title' ); |
273 | 273 | |
274 | 274 | $options = array(); |
275 | 275 | |
Index: trunk/phase3/includes/specials/SpecialBlock.php |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | $this->outputHeader(); |
93 | 93 | |
94 | 94 | $out = $this->getOutput(); |
95 | | - $out->setPageTitle( wfMsg( 'blockip-title' ) ); |
| 95 | + $out->setPageTitleMsg( 'blockip-title' ); |
96 | 96 | $out->addModules( array( 'mediawiki.special', 'mediawiki.special.block' ) ); |
97 | 97 | |
98 | 98 | $fields = $this->getFormFields(); |
— | — | @@ -111,7 +111,7 @@ |
112 | 112 | $this->doPostText( $form ); |
113 | 113 | |
114 | 114 | if( $form->show() ){ |
115 | | - $out->setPageTitle( wfMsg( 'blockipsuccesssub' ) ); |
| 115 | + $out->setPageTitleMsg( 'blockipsuccesssub' ); |
116 | 116 | $out->addWikiMsg( 'blockipsuccesstext', $this->target ); |
117 | 117 | } |
118 | 118 | } |
Index: trunk/phase3/includes/specials/SpecialTags.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | $this->outputHeader(); |
42 | 42 | |
43 | 43 | $out = $this->getOutput(); |
44 | | - $out->setPageTitle( wfMsg( 'tags-title' ) ); |
| 44 | + $out->setPageTitleMsg( 'tags-title' ); |
45 | 45 | $out->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 'tags-intro' ); |
46 | 46 | |
47 | 47 | // Write the headers |
Index: trunk/phase3/includes/specials/SpecialWatchlist.php |
— | — | @@ -55,7 +55,7 @@ |
56 | 56 | |
57 | 57 | # Anons don't get a watchlist |
58 | 58 | if( $user->isAnon() ) { |
59 | | - $output->setPageTitle( wfMsg( 'watchnologin' ) ); |
| 59 | + $output->setPageTitleMsg( 'watchnologin' ); |
60 | 60 | $llink = Linker::linkKnown( |
61 | 61 | SpecialPage::getTitleFor( 'Userlogin' ), |
62 | 62 | wfMsgHtml( 'loginreqlink' ), |
Index: trunk/phase3/includes/specials/SpecialSearch.php |
— | — | @@ -435,8 +435,8 @@ |
436 | 436 | $this->searchAdvanced = ($this->profile === 'advanced'); |
437 | 437 | $out = $this->getOutput(); |
438 | 438 | if( strval( $term ) !== '' ) { |
439 | | - $out->setPageTitle( wfMsg( 'searchresults') ); |
440 | | - $out->setHTMLTitle( wfMsg( 'pagetitle', wfMsg( 'searchresults-title', $term ) ) ); |
| 439 | + $out->setPageTitleMsg( 'searchresults' ); |
| 440 | + $out->setHTMLTitleMsg( 'pagetitle', wfMsg( 'searchresults-title', $term ) ); |
441 | 441 | } |
442 | 442 | // add javascript specific to special:search |
443 | 443 | $out->addModules( 'mediawiki.special.search' ); |
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php |
— | — | @@ -167,9 +167,6 @@ |
168 | 168 | } |
169 | 169 | |
170 | 170 | private function showHistory() { |
171 | | - $out = $this->getOutput(); |
172 | | - $out->setPageTitle( wfMsg( 'mergehistory' ) ); |
173 | | - |
174 | 171 | $this->showMergeForm(); |
175 | 172 | |
176 | 173 | # List all stored revisions |
— | — | @@ -178,6 +175,7 @@ |
179 | 176 | ); |
180 | 177 | $haveRevisions = $revisions && $revisions->getNumRows() > 0; |
181 | 178 | |
| 179 | + $out = $this->getOutput(); |
182 | 180 | $titleObj = $this->getTitle(); |
183 | 181 | $action = $titleObj->getLocalURL( array( 'action' => 'submit' ) ); |
184 | 182 | # Start the form here |
Index: trunk/phase3/includes/specials/SpecialEmailuser.php |
— | — | @@ -135,11 +135,11 @@ |
136 | 136 | return false; |
137 | 137 | } |
138 | 138 | |
139 | | - $out->setPageTitle( wfMsg( 'emailpage' ) ); |
| 139 | + $out->setPageTitleMsg( 'emailpage' ); |
140 | 140 | $result = $form->show(); |
141 | 141 | |
142 | 142 | if( $result === true || ( $result instanceof Status && $result->isGood() ) ) { |
143 | | - $out->setPageTitle( wfMsg( 'emailsent' ) ); |
| 143 | + $out->setPageTitleMsg( 'emailsent' ); |
144 | 144 | $out->addWikiMsg( 'emailsenttext' ); |
145 | 145 | $out->returnToMain( false, $this->mTargetObj->getUserPage() ); |
146 | 146 | } |