Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -224,7 +224,7 @@ |
225 | 225 | } |
226 | 226 | |
227 | 227 | $titleLink = Linker::link( $this->mTitle ); |
228 | | - $wgOut->setPageTitleMsg( 'protect-title', $this->mTitle->getPrefixedText() ); |
| 228 | + $wgOut->setPageTitle( wfMessage( '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/diff/DifferenceEngine.php |
— | — | @@ -188,7 +188,7 @@ |
189 | 189 | $d = wfMsgExt( 'missingarticle-diff', array( 'escape' ), |
190 | 190 | $this->deletedIdMarker( $this->mOldid ), |
191 | 191 | $this->deletedIdMarker( $this->mNewid ) ); |
192 | | - $wgOut->setPagetitle( wfMsg( 'errorpagetitle' ) ); |
| 192 | + $wgOut->setPageTitle( wfMessage( 'errorpagetitle' ) ); |
193 | 193 | $wgOut->addWikiMsg( 'missing-article', "<nowiki>$t</nowiki>", "<span class='plainlinks'>$d</span>" ); |
194 | 194 | wfProfileOut( __METHOD__ ); |
195 | 195 | return; |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -1334,7 +1334,7 @@ |
1335 | 1335 | return; |
1336 | 1336 | } |
1337 | 1337 | |
1338 | | - $wgOut->setPagetitle( wfMsg( 'delete-confirm', $this->getTitle()->getPrefixedText() ) ); |
| 1338 | + $wgOut->setPageTitle( wfMessage( 'delete-confirm', $this->getTitle()->getPrefixedText() ) ); |
1339 | 1339 | |
1340 | 1340 | # Better double-check that it hasn't been deleted yet! |
1341 | 1341 | $dbw = wfGetDB( DB_MASTER ); |
— | — | @@ -1529,7 +1529,7 @@ |
1530 | 1530 | if ( $this->mPage->doDeleteArticle( $reason, $suppress, $id, $error ) ) { |
1531 | 1531 | $deleted = $this->getTitle()->getPrefixedText(); |
1532 | 1532 | |
1533 | | - $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) ); |
| 1533 | + $wgOut->setPageTitle( wfMessage( 'actioncomplete' ) ); |
1534 | 1534 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
1535 | 1535 | |
1536 | 1536 | $loglink = '[[Special:Log/delete|' . wfMsgNoTrans( 'deletionlog' ) . ']]'; |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -795,7 +795,7 @@ |
796 | 796 | */ |
797 | 797 | function showError( $description ) { |
798 | 798 | global $wgOut; |
799 | | - $wgOut->setPageTitle( wfMsg( 'internalerror' ) ); |
| 799 | + $wgOut->setPageTitle( wfMessage( 'internalerror' ) ); |
800 | 800 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
801 | 801 | $wgOut->setArticleRelated( false ); |
802 | 802 | $wgOut->enableClientCache( false ); |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1361,10 +1361,10 @@ |
1362 | 1362 | global $wgOut; |
1363 | 1363 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
1364 | 1364 | if ( $this->isConflict ) { |
1365 | | - $wgOut->setPageTitleMsg( 'editconflict', $this->getContextTitle()->getPrefixedText() ); |
| 1365 | + $wgOut->setPageTitle( wfMessage( 'editconflict', $this->getContextTitle()->getPrefixedText() ) ); |
1366 | 1366 | } elseif ( $this->section != '' ) { |
1367 | 1367 | $msg = $this->section == 'new' ? 'editingcomment' : 'editingsection'; |
1368 | | - $wgOut->setPageTitleMsg( $msg, $this->getContextTitle()->getPrefixedText() ); |
| 1368 | + $wgOut->setPageTitle( wfMessage( $msg, $this->getContextTitle()->getPrefixedText() ) ); |
1369 | 1369 | } else { |
1370 | 1370 | # Use the title defined by DISPLAYTITLE magic word when present |
1371 | 1371 | if ( isset( $this->mParserOutput ) |
— | — | @@ -1373,7 +1373,7 @@ |
1374 | 1374 | } else { |
1375 | 1375 | $title = $this->getContextTitle()->getPrefixedText(); |
1376 | 1376 | } |
1377 | | - $wgOut->setPageTitleMsg( 'editing', $title ); |
| 1377 | + $wgOut->setPageTitle( wfMessage( 'editing', $title ) ); |
1378 | 1378 | } |
1379 | 1379 | } |
1380 | 1380 | |
— | — | @@ -2226,7 +2226,7 @@ |
2227 | 2227 | array( 'returnto' => $this->getContextTitle()->getPrefixedText() ) |
2228 | 2228 | ); |
2229 | 2229 | |
2230 | | - $wgOut->setPageTitleMsg( 'whitelistedittitle' ); |
| 2230 | + $wgOut->setPageTitle( wfMessage( 'whitelistedittitle' ) ); |
2231 | 2231 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2232 | 2232 | $wgOut->setArticleRelated( false ); |
2233 | 2233 | |
— | — | @@ -2241,7 +2241,7 @@ |
2242 | 2242 | function noSuchSectionPage() { |
2243 | 2243 | global $wgOut; |
2244 | 2244 | |
2245 | | - $wgOut->setPageTitleMsg( 'nosuchsectiontitle' ); |
| 2245 | + $wgOut->setPageTitle( wfMessage( 'nosuchsectiontitle' ) ); |
2246 | 2246 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2247 | 2247 | $wgOut->setArticleRelated( false ); |
2248 | 2248 | |
— | — | @@ -2261,7 +2261,7 @@ |
2262 | 2262 | static function spamPage( $match = false ) { |
2263 | 2263 | global $wgOut, $wgTitle; |
2264 | 2264 | |
2265 | | - $wgOut->setPageTitleMsg( 'spamprotectiontitle' ); |
| 2265 | + $wgOut->setPageTitle( wfMessage( 'spamprotectiontitle' ) ); |
2266 | 2266 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2267 | 2267 | $wgOut->setArticleRelated( false ); |
2268 | 2268 | |
— | — | @@ -2284,7 +2284,7 @@ |
2285 | 2285 | global $wgOut; |
2286 | 2286 | $this->textbox2 = $this->textbox1; |
2287 | 2287 | |
2288 | | - $wgOut->setPageTitleMsg( 'spamprotectiontitle' ); |
| 2288 | + $wgOut->setPageTitle( wfMessage( 'spamprotectiontitle' ) ); |
2289 | 2289 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2290 | 2290 | $wgOut->setArticleRelated( false ); |
2291 | 2291 | |
— | — | @@ -2845,7 +2845,7 @@ |
2846 | 2846 | |
2847 | 2847 | function noCreatePermission() { |
2848 | 2848 | global $wgOut; |
2849 | | - $wgOut->setPageTitleMsg( 'nocreatetitle' ); |
| 2849 | + $wgOut->setPageTitle( wfMessage( 'nocreatetitle' ) ); |
2850 | 2850 | $wgOut->addWikiMsg( 'nocreatetext' ); |
2851 | 2851 | } |
2852 | 2852 | |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -760,23 +760,14 @@ |
761 | 761 | * @param $name string |
762 | 762 | */ |
763 | 763 | public function setHTMLTitle( $name ) { |
764 | | - $this->mHTMLtitle = $name; |
| 764 | + if ( $name instanceof Message ) { |
| 765 | + $this->mHTMLtitle = $name->setContext( $this->getContext() )->text(); |
| 766 | + } else { |
| 767 | + $this->mHTMLtitle = $name; |
| 768 | + } |
765 | 769 | } |
766 | 770 | |
767 | 771 | /** |
768 | | - * Same as setHTMLTitle(), but takes a message name and parameter instead |
769 | | - * of directly the string to display. |
770 | | - * |
771 | | - * @since 1.19 |
772 | | - * @param $name String message name |
773 | | - * @param $args Array|String message parameters, if there's only one |
774 | | - * parameter it can be passed directly as a string. |
775 | | - */ |
776 | | - public function setHTMLTitleMsg( $name, $args = array() ) { |
777 | | - $this->setHTMLTitle( $this->msg( $name, $args )->text() ); |
778 | | - } |
779 | | - |
780 | | - /** |
781 | 772 | * Return the "HTML title", i.e. the content of the <title> tag. |
782 | 773 | * |
783 | 774 | * @return String |
— | — | @@ -791,32 +782,23 @@ |
792 | 783 | * This function automatically sets \<title\> to the same content as \<h1\> but with all tags removed. |
793 | 784 | * Bad tags that were escaped in \<h1\> will still be escaped in \<title\>, and good tags like \<i\> will be dropped entirely. |
794 | 785 | * |
795 | | - * @param $name string |
| 786 | + * @param $name string|Message |
796 | 787 | */ |
797 | 788 | public function setPageTitle( $name ) { |
| 789 | + if ( $name instanceof Message ) { |
| 790 | + $name = $name->setContext( $this->getContext() )->text(); |
| 791 | + } |
| 792 | + |
798 | 793 | # change "<script>foo&bar</script>" to "<script>foo&bar</script>" |
799 | 794 | # but leave "<i>foobar</i>" alone |
800 | 795 | $nameWithTags = Sanitizer::normalizeCharReferences( Sanitizer::removeHTMLtags( $name ) ); |
801 | 796 | $this->mPagetitle = $nameWithTags; |
802 | 797 | |
803 | 798 | # change "<i>foo&bar</i>" to "foo&bar" |
804 | | - $this->setHTMLTitleMsg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ); |
| 799 | + $this->setHTMLTitle( $this->msg( 'pagetitle', Sanitizer::stripAllTags( $nameWithTags ) ) ); |
805 | 800 | } |
806 | 801 | |
807 | 802 | /** |
808 | | - * Same as setPageTitle(), but takes a message name and parameter instead |
809 | | - * of directly the string to display. |
810 | | - * |
811 | | - * @since 1.19 |
812 | | - * @param $name String message name |
813 | | - * @param $args Array|String message parameters, if there's only one |
814 | | - * parameter it can be passed directly as a string. |
815 | | - */ |
816 | | - public function setPageTitleMsg( $name, $args = array() ) { |
817 | | - $this->setPageTitle( $this->msg( $name, $args )->text() ); |
818 | | - } |
819 | | - |
820 | | - /** |
821 | 803 | * Return the "page title", i.e. the content of the \<h1\> tag. |
822 | 804 | * |
823 | 805 | * @return String |
— | — | @@ -1956,8 +1938,8 @@ |
1957 | 1939 | if ( $this->getTitle() ) { |
1958 | 1940 | $this->mDebugtext .= 'Original title: ' . $this->getTitle()->getPrefixedText() . "\n"; |
1959 | 1941 | } |
1960 | | - $this->setPageTitleMsg( $title ); |
1961 | | - $this->setHTMLTitleMsg( 'errorpagetitle' ); |
| 1942 | + $this->setPageTitle( $this->msg( $title ) ); |
| 1943 | + $this->setHTMLTitle( $this->msg( 'errorpagetitle' ) ); |
1962 | 1944 | $this->setRobotPolicy( 'noindex,nofollow' ); |
1963 | 1945 | $this->setArticleRelated( false ); |
1964 | 1946 | $this->enableClientCache( false ); |
— | — | @@ -1982,8 +1964,8 @@ |
1983 | 1965 | public function showPermissionsErrorPage( $errors, $action = null ) { |
1984 | 1966 | $this->mDebugtext .= 'Original title: ' . |
1985 | 1967 | $this->getTitle()->getPrefixedText() . "\n"; |
1986 | | - $this->setPageTitleMsg( 'permissionserrors' ); |
1987 | | - $this->setHTMLTitleMsg( 'permissionserrors' ); |
| 1968 | + $this->setPageTitle( $this->msg( 'permissionserrors' ) ); |
| 1969 | + $this->setHTMLTitle( $this->msg('permissionserrors' ) ); |
1988 | 1970 | $this->setRobotPolicy( 'noindex,nofollow' ); |
1989 | 1971 | $this->setArticleRelated( false ); |
1990 | 1972 | $this->enableClientCache( false ); |
— | — | @@ -1999,8 +1981,8 @@ |
2000 | 1982 | * @param $version Mixed: the version of MediaWiki needed to use the page |
2001 | 1983 | */ |
2002 | 1984 | public function versionRequired( $version ) { |
2003 | | - $this->setPageTitleMsg( 'versionrequired' ); |
2004 | | - $this->setHTMLTitleMsg( 'versionrequired', $version ); |
| 1985 | + $this->setPageTitle( $this->msg( 'versionrequired' ) ); |
| 1986 | + $this->setHTMLTitle( $this->msg( 'versionrequired', $version ) ); |
2005 | 1987 | $this->setRobotPolicy( 'noindex,nofollow' ); |
2006 | 1988 | $this->setArticleRelated( false ); |
2007 | 1989 | $this->mBodytext = ''; |
— | — | @@ -2026,8 +2008,8 @@ |
2027 | 2009 | throw new PermissionsError( 'read' ); |
2028 | 2010 | } |
2029 | 2011 | |
2030 | | - $this->setPageTitleMsg( 'loginreqtitle' ); |
2031 | | - $this->setHTMLTitleMsg( 'errorpagetitle' ); |
| 2012 | + $this->setPageTitle( $this->msg( 'loginreqtitle' ) ); |
| 2013 | + $this->setHTMLTitle( $this->msg( 'errorpagetitle' ) ); |
2032 | 2014 | $this->setRobotPolicy( 'noindex,nofollow' ); |
2033 | 2015 | $this->setArticleRelated( false ); |
2034 | 2016 | |
— | — | @@ -2119,12 +2101,12 @@ |
2120 | 2102 | if ( !empty( $reasons ) ) { |
2121 | 2103 | // Permissions error |
2122 | 2104 | if( $source ) { |
2123 | | - $this->setPageTitleMsg( 'viewsource' ); |
| 2105 | + $this->setPageTitle( $this->msg( 'viewsource' ) ); |
2124 | 2106 | $this->setSubtitle( |
2125 | 2107 | $this->msg( 'viewsourcefor', Linker::linkKnown( $this->getTitle() ) )->text() |
2126 | 2108 | ); |
2127 | 2109 | } else { |
2128 | | - $this->setPageTitleMsg( 'badaccess' ); |
| 2110 | + $this->setPageTitle( $this->msg( 'badaccess' ) ); |
2129 | 2111 | } |
2130 | 2112 | $this->addWikiText( $this->formatPermissionsErrorMessage( $reasons, $action ) ); |
2131 | 2113 | } else { |
— | — | @@ -2194,7 +2176,7 @@ |
2195 | 2177 | } |
2196 | 2178 | |
2197 | 2179 | public function showFatalError( $message ) { |
2198 | | - $this->setPageTitleMsg( 'internalerror' ); |
| 2180 | + $this->setPageTitle( $this->msg( 'internalerror' ) ); |
2199 | 2181 | $this->setRobotPolicy( 'noindex,nofollow' ); |
2200 | 2182 | $this->setArticleRelated( false ); |
2201 | 2183 | $this->enableClientCache( false ); |
— | — | @@ -2286,7 +2268,7 @@ |
2287 | 2269 | $ret = Html::htmlHeader( array( 'lang' => $this->getLang()->getCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) ); |
2288 | 2270 | |
2289 | 2271 | if ( $this->getHTMLTitle() == '' ) { |
2290 | | - $this->setHTMLTitleMsg( 'pagetitle', $this->getPageTitle() ); |
| 2272 | + $this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() ) ); |
2291 | 2273 | } |
2292 | 2274 | |
2293 | 2275 | $openHead = Html::openElement( 'head' ); |
Index: trunk/phase3/includes/context/RequestContext.php |
— | — | @@ -252,7 +252,7 @@ |
253 | 253 | */ |
254 | 254 | public function msg() { |
255 | 255 | $args = func_get_args(); |
256 | | - return call_user_func_array( 'wfMessage', $args )->inLanguage( $this->getLang() )->title( $this->getTitle() ); |
| 256 | + return call_user_func_array( 'wfMessage', $args )->setContext( $this ); |
257 | 257 | } |
258 | 258 | |
259 | 259 | /** Static methods **/ |
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()->setPageTitleMsg( 'markedaspatrollederror' ); |
| 71 | + $this->getOutput()->setPageTitle( $this->msg( '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()->setPageTitleMsg( 'markedaspatrolled' ); |
| 83 | + $this->getOutput()->setPageTitle( $this->msg( '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()->setPageTitleMsg( 'rollbackfailed' ); |
| 58 | + $this->getOutput()->setPageTitle( $this->msg( '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()->setPageTitleMsg( 'actioncomplete' ); |
| 99 | + $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) ); |
100 | 100 | $this->getOutput()->setRobotPolicy( 'noindex,nofollow' ); |
101 | 101 | |
102 | 102 | if ( $current->getUserText() === '' ) { |
Index: trunk/phase3/includes/Message.php |
— | — | @@ -205,6 +205,19 @@ |
206 | 206 | } |
207 | 207 | |
208 | 208 | /** |
| 209 | + * Set the language and the title from a context object |
| 210 | + * |
| 211 | + * @param $context IContextSource |
| 212 | + * @return Message: $this |
| 213 | + */ |
| 214 | + public function setContext( IContextSource $context ) { |
| 215 | + $this->inLanguage( $context->getLang() ); |
| 216 | + $this->title( $context->getTitle() ); |
| 217 | + |
| 218 | + return $this; |
| 219 | + } |
| 220 | + |
| 221 | + /** |
209 | 222 | * Request the message in any language that is supported. |
210 | 223 | * As a side effect interface message status is unconditionally |
211 | 224 | * turned off. |
Index: trunk/phase3/includes/FileDeleteForm.php |
— | — | @@ -78,7 +78,7 @@ |
79 | 79 | $wgOut->addHTML( '</span>' ); |
80 | 80 | } |
81 | 81 | if( $status->ok ) { |
82 | | - $wgOut->setPageTitleMsg( 'actioncomplete' ); |
| 82 | + $wgOut->setPageTitle( wfMessage( '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->setPageTitleMsg( 'filedelete', $this->title->getText() ); |
| 275 | + $wgOut->setPageTitle( wfMessage( 'filedelete', $this->title->getText() ) ); |
276 | 276 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
277 | 277 | $wgOut->setSubtitle( wfMsg( |
278 | 278 | 'filedelete-backlink', |
Index: trunk/phase3/includes/specials/SpecialAllpages.php |
— | — | @@ -73,10 +73,10 @@ |
74 | 74 | |
75 | 75 | $namespaces = $wgContLang->getNamespaces(); |
76 | 76 | |
77 | | - $out->setPagetitle( |
| 77 | + $out->setPageTitle( |
78 | 78 | ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces) ) ) ? |
79 | | - wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) : |
80 | | - wfMsg( 'allarticles' ) |
| 79 | + $this->msg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) : |
| 80 | + $this->msg( 'allarticles' ) |
81 | 81 | ); |
82 | 82 | $out->addModuleStyles( 'mediawiki.special' ); |
83 | 83 | |
Index: trunk/phase3/includes/specials/SpecialUnblock.php |
— | — | @@ -53,7 +53,7 @@ |
54 | 54 | $this->outputHeader(); |
55 | 55 | |
56 | 56 | $out = $this->getOutput(); |
57 | | - $out->setPageTitleMsg( 'unblockip' ); |
| 57 | + $out->setPageTitle( $this->msg( '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()->setPageTitleMsg( 'recentchangeslinked-title', $title->getPrefixedText() ); |
| 79 | + $this->getOutput()->setPageTitle( $this->msg( '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 |
— | — | @@ -649,9 +649,9 @@ |
650 | 650 | $out = $this->getOutput(); |
651 | 651 | |
652 | 652 | if ( $this->mAllowed ) { |
653 | | - $out->setPageTitleMsg( 'undeletepage' ); |
| 653 | + $out->setPageTitle( $this->msg( 'undeletepage' ) ); |
654 | 654 | } else { |
655 | | - $out->setPageTitleMsg( 'viewdeletedpage' ); |
| 655 | + $out->setPageTitle( $this->msg( 'viewdeletedpage' ) ); |
656 | 656 | } |
657 | 657 | |
658 | 658 | if( $par != '' ) { |
— | — | @@ -802,7 +802,7 @@ |
803 | 803 | } |
804 | 804 | } |
805 | 805 | |
806 | | - $out->setPageTitleMsg( 'undeletepage' ); |
| 806 | + $out->setPageTitle( $this->msg( 'undeletepage' ) ); |
807 | 807 | |
808 | 808 | if( $this->mDiff ) { |
809 | 809 | $previousRev = $archive->getPreviousRevision( $timestamp ); |
— | — | @@ -1016,9 +1016,9 @@ |
1017 | 1017 | $out = $this->getOutput(); |
1018 | 1018 | if( $this->mAllowed ) { |
1019 | 1019 | $out->addModules( 'mediawiki.special.undelete' ); |
1020 | | - $out->setPageTitleMsg( 'undeletepage' ); |
| 1020 | + $out->setPageTitle( $this->msg( 'undeletepage' ) ); |
1021 | 1021 | } else { |
1022 | | - $out->setPageTitleMsg( 'viewdeletedpage' ); |
| 1022 | + $out->setPageTitle( $this->msg( 'viewdeletedpage' ) ); |
1023 | 1023 | } |
1024 | 1024 | $out->wrapWikiMsg( |
1025 | 1025 | "<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->setPageTitleMsg( 'ipblocklist' ); |
| 47 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'accmailtitle' ); |
| 193 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'accountcreated' ); |
| 255 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'loginsuccesstitle' ); |
| 887 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'cantcreateaccounttitle' ); |
| 918 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'userlogin' ); |
| 1081 | + $out->setPageTitle( $this->msg( 'userlogin' ) ); |
1082 | 1082 | } else { |
1083 | | - $out->setPageTitleMsg( 'userloginnocreate' ); |
| 1083 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'whatlinkshere-title', $this->target->getPrefixedText() ); |
| 90 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'watchnologin' ); |
| 38 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'watchlistedit-raw-title' ); |
| 79 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'watchlistedit-normal-title' ); |
| 89 | + $out->setPageTitle( $this->msg( 'watchlistedit-normal-title' ) ); |
90 | 90 | $form = $this->getNormalForm(); |
91 | 91 | if( $form->show() ){ |
92 | 92 | $out->addHTML( $this->successMessage ); |
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
— | — | @@ -538,7 +538,7 @@ |
539 | 539 | * Report that the submit operation succeeded |
540 | 540 | */ |
541 | 541 | protected function success() { |
542 | | - $this->getOutput()->setPagetitle( wfMsg( 'actioncomplete' ) ); |
| 542 | + $this->getOutput()->setPageTitle( $this->msg( 'actioncomplete' ) ); |
543 | 543 | $this->getOutput()->wrapWikiMsg( "<span class=\"success\">\n$1\n</span>", $this->typeInfo['success'] ); |
544 | 544 | $this->list->reloadFromMaster(); |
545 | 545 | $this->showForm(); |
— | — | @@ -548,7 +548,7 @@ |
549 | 549 | * Report that the submit operation failed |
550 | 550 | */ |
551 | 551 | protected function failure( $status ) { |
552 | | - $this->getOutput()->setPagetitle( wfMsg( 'actionfailed' ) ); |
| 552 | + $this->getOutput()->setPageTitle( $this->msg( 'actionfailed' ) ); |
553 | 553 | $this->getOutput()->addWikiText( $status->getWikiText( $this->typeInfo['failure'] ) ); |
554 | 554 | $this->showForm(); |
555 | 555 | } |
Index: trunk/phase3/includes/specials/SpecialPrefixindex.php |
— | — | @@ -54,10 +54,10 @@ |
55 | 55 | $namespace = (int)$ns; // if no namespace given, use 0 (NS_MAIN). |
56 | 56 | |
57 | 57 | $namespaces = $wgContLang->getNamespaces(); |
58 | | - $out->setPagetitle( |
| 58 | + $out->setPageTitle( |
59 | 59 | ( $namespace > 0 && in_array( $namespace, array_keys( $namespaces ) ) ) |
60 | | - ? wfMsg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) |
61 | | - : wfMsg( 'prefixindex' ) |
| 60 | + ? $this->msg( 'allinnamespace', str_replace( '_', ' ', $namespaces[$namespace] ) ) |
| 61 | + : $this->msg( 'prefixindex' ) |
62 | 62 | ); |
63 | 63 | |
64 | 64 | $showme = ''; |
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->setHTMLTitleMsg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ),$target ) ); |
| 88 | + $out->setHTMLTitle( $this->msg( '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->setHTMLTitleMsg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ); |
| 95 | + $out->setHTMLTitle( $this->msg( '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 |
— | — | @@ -269,7 +269,7 @@ |
270 | 270 | |
271 | 271 | $request = $this->getRequest(); |
272 | 272 | $out = $this->getOutput(); |
273 | | - $out->setPageTitleMsg( 'deletedcontributions-title' ); |
| 273 | + $out->setPageTitle( $this->msg( 'deletedcontributions-title' ) ); |
274 | 274 | |
275 | 275 | $options = array(); |
276 | 276 | |
Index: trunk/phase3/includes/specials/SpecialBlock.php |
— | — | @@ -91,7 +91,7 @@ |
92 | 92 | $this->outputHeader(); |
93 | 93 | |
94 | 94 | $out = $this->getOutput(); |
95 | | - $out->setPageTitleMsg( 'blockip-title' ); |
| 95 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'blockipsuccesssub' ); |
| 115 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'tags-title' ); |
| 44 | + $out->setPageTitle( $this->msg( '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->setPageTitleMsg( 'watchnologin' ); |
| 59 | + $output->setPageTitle( $this->msg( 'watchnologin' ) ); |
60 | 60 | $llink = Linker::linkKnown( |
61 | 61 | SpecialPage::getTitleFor( 'Userlogin' ), |
62 | 62 | wfMsgHtml( 'loginreqlink' ), |
Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | $oldTitleLink = Linker::link( $this->oldTitle ); |
114 | 114 | |
115 | 115 | $out = $this->getOutput(); |
116 | | - $out->setPagetitle( wfMsg( 'move-page', $this->oldTitle->getPrefixedText() ) ); |
| 116 | + $out->setPageTitle( $this->msg( 'move-page', $this->oldTitle->getPrefixedText() ) ); |
117 | 117 | $out->addModules( 'mediawiki.special.movePage' ); |
118 | 118 | |
119 | 119 | $newTitle = $this->newTitle; |
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->setPageTitleMsg( 'searchresults' ); |
440 | | - $out->setHTMLTitleMsg( 'pagetitle', wfMsg( 'searchresults-title', $term ) ); |
| 439 | + $out->setPageTitle( $this->msg( 'searchresults' ) ); |
| 440 | + $out->setHTMLTitle( $this->msg( 'pagetitle', $this->msg( 'searchresults-title', $term )->plain() ) ); |
441 | 441 | } |
442 | 442 | // add javascript specific to special:search |
443 | 443 | $out->addModules( 'mediawiki.special.search' ); |
Index: trunk/phase3/includes/specials/SpecialEmailuser.php |
— | — | @@ -135,11 +135,11 @@ |
136 | 136 | return false; |
137 | 137 | } |
138 | 138 | |
139 | | - $out->setPageTitleMsg( 'emailpage' ); |
| 139 | + $out->setPageTitle( $this->msg( 'emailpage' ) ); |
140 | 140 | $result = $form->show(); |
141 | 141 | |
142 | 142 | if( $result === true || ( $result instanceof Status && $result->isGood() ) ) { |
143 | | - $out->setPageTitleMsg( 'emailsent' ); |
| 143 | + $out->setPageTitle( $this->msg( 'emailsent' ) ); |
144 | 144 | $out->addWikiMsg( 'emailsenttext' ); |
145 | 145 | $out->returnToMain( false, $this->mTargetObj->getUserPage() ); |
146 | 146 | } |