Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1324,8 +1324,6 @@ |
1325 | 1325 | |
1326 | 1326 | wfProfileIn( __METHOD__ ); |
1327 | 1327 | |
1328 | | - $sk = $wgUser->getSkin(); |
1329 | | - |
1330 | 1328 | #need to parse the preview early so that we know which templates are used, |
1331 | 1329 | #otherwise users with "show preview after edit box" will get a blank list |
1332 | 1330 | #we parse this near the beginning so that setHeaders can do the title |
— | — | @@ -1366,10 +1364,10 @@ |
1367 | 1365 | $wgOut->addHTML( $this->editFormTextTop ); |
1368 | 1366 | |
1369 | 1367 | $templates = $this->getTemplates(); |
1370 | | - $formattedtemplates = $sk->formatTemplates( $templates, $this->preview, $this->section != ''); |
| 1368 | + $formattedtemplates = Linker::formatTemplates( $templates, $this->preview, $this->section != ''); |
1371 | 1369 | |
1372 | 1370 | $hiddencats = $this->mArticle->getHiddenCategories(); |
1373 | | - $formattedhiddencats = $sk->formatHiddenCategories( $hiddencats ); |
| 1371 | + $formattedhiddencats = Linker::formatHiddenCategories( $hiddencats ); |
1374 | 1372 | |
1375 | 1373 | if ( $this->wasDeletedSinceLastEdit() && 'save' != $this->formtype ) { |
1376 | 1374 | $wgOut->wrapWikiMsg( |
— | — | @@ -1408,7 +1406,7 @@ |
1409 | 1407 | '<div class="mw-confirm-recreate">' . |
1410 | 1408 | wfMsgExt( $key, 'parseinline', $username, "<nowiki>$comment</nowiki>" ) . |
1411 | 1409 | Xml::checkLabel( wfMsg( 'recreate' ), 'wpRecreate', 'wpRecreate', false, |
1412 | | - array( 'title' => $sk->titleAttrib( 'recreate' ), 'tabindex' => 1, 'id' => 'wpRecreate' ) |
| 1410 | + array( 'title' => Linker::titleAttrib( 'recreate' ), 'tabindex' => 1, 'id' => 'wpRecreate' ) |
1413 | 1411 | ) . |
1414 | 1412 | '</div>' |
1415 | 1413 | ); |
— | — | @@ -1696,15 +1694,14 @@ |
1697 | 1695 | if ( !$summary || ( !$this->preview && !$this->diff ) ) |
1698 | 1696 | return ""; |
1699 | 1697 | |
1700 | | - global $wgParser, $wgUser; |
1701 | | - $sk = $wgUser->getSkin(); |
| 1698 | + global $wgParser; |
1702 | 1699 | |
1703 | 1700 | if ( $isSubjectPreview ) |
1704 | 1701 | $summary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $summary ) ); |
1705 | 1702 | |
1706 | 1703 | $message = $isSubjectPreview ? 'subject-preview' : 'summary-preview'; |
1707 | 1704 | |
1708 | | - $summary = wfMsgExt( $message, 'parseinline' ) . $sk->commentBlock( $summary, $this->mTitle, $isSubjectPreview ); |
| 1705 | + $summary = wfMsgExt( $message, 'parseinline' ) . Linker::commentBlock( $summary, $this->mTitle, $isSubjectPreview ); |
1709 | 1706 | return Xml::tags( 'div', array( 'class' => 'mw-summary-preview' ), $summary ); |
1710 | 1707 | } |
1711 | 1708 | |
— | — | @@ -1879,16 +1876,16 @@ |
1880 | 1877 | if( !wfMessage( $msg )->isDisabled() ) { |
1881 | 1878 | global $wgOut; |
1882 | 1879 | $wgOut->addHTML( '<div class="mw-tos-summary">' ); |
1883 | | - $wgOut->addWikiMsgArray( $msg, array() ); |
| 1880 | + $wgOut->addWikiMsg( $msg ); |
1884 | 1881 | $wgOut->addHTML( '</div>' ); |
1885 | 1882 | } |
1886 | 1883 | } |
1887 | 1884 | |
1888 | 1885 | protected function showEditTools() { |
1889 | 1886 | global $wgOut; |
1890 | | - $wgOut->addHTML( '<div class="mw-editTools">' ); |
1891 | | - $wgOut->addWikiMsgArray( 'edittools', array(), array( 'content' ) ); |
1892 | | - $wgOut->addHTML( '</div>' ); |
| 1887 | + $wgOut->addHTML( '<div class="mw-editTools">' . |
| 1888 | + wfMessage( 'edittools' )->inContentLanguage()->parse() . |
| 1889 | + '</div>' ); |
1893 | 1890 | } |
1894 | 1891 | |
1895 | 1892 | protected function getCopywarn() { |
— | — | @@ -1909,7 +1906,7 @@ |
1910 | 1907 | } |
1911 | 1908 | |
1912 | 1909 | protected function showStandardInputs( &$tabindex = 2 ) { |
1913 | | - global $wgOut, $wgUser; |
| 1910 | + global $wgOut; |
1914 | 1911 | $wgOut->addHTML( "<div class='editOptions'>\n" ); |
1915 | 1912 | |
1916 | 1913 | if ( $this->section != 'new' ) { |
— | — | @@ -1917,7 +1914,7 @@ |
1918 | 1915 | $wgOut->addHTML( $this->getSummaryPreview( false, $this->summary ) ); |
1919 | 1916 | } |
1920 | 1917 | |
1921 | | - $checkboxes = $this->getCheckboxes( $tabindex, $wgUser->getSkin(), |
| 1918 | + $checkboxes = $this->getCheckboxes( $tabindex, |
1922 | 1919 | array( 'minor' => $this->minoredit, 'watch' => $this->watchthis ) ); |
1923 | 1920 | $wgOut->addHTML( "<div class='editCheckboxes'>" . implode( $checkboxes, "\n" ) . "</div>\n" ); |
1924 | 1921 | $wgOut->addHTML( "<div class='editButtons'>\n" ); |
— | — | @@ -2151,23 +2148,21 @@ |
2152 | 2149 | * Produce the stock "please login to edit pages" page |
2153 | 2150 | */ |
2154 | 2151 | function userNotLoggedInPage() { |
2155 | | - global $wgUser, $wgOut; |
2156 | | - $skin = $wgUser->getSkin(); |
| 2152 | + global $wgOut; |
2157 | 2153 | |
2158 | 2154 | $loginTitle = SpecialPage::getTitleFor( 'Userlogin' ); |
2159 | | - $loginLink = $skin->link( |
| 2155 | + $loginLink = Linker::linkKnown( |
2160 | 2156 | $loginTitle, |
2161 | 2157 | wfMsgHtml( 'loginreqlink' ), |
2162 | 2158 | array(), |
2163 | | - array( 'returnto' => $this->getContextTitle()->getPrefixedText() ), |
2164 | | - array( 'known', 'noclasses' ) |
| 2159 | + array( 'returnto' => $this->getContextTitle()->getPrefixedText() ) |
2165 | 2160 | ); |
2166 | 2161 | |
2167 | 2162 | $wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) ); |
2168 | 2163 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
2169 | 2164 | $wgOut->setArticleRelated( false ); |
2170 | 2165 | |
2171 | | - $wgOut->addWikiMsgArray( 'whitelistedittext', array( $loginLink ), array( 'replaceafter' ) ); |
| 2166 | + $wgOut->addHTML( wfMessage( 'whitelistedittext' )->rawParams( $loginLink )->parse() ); |
2172 | 2167 | $wgOut->returnToMain( false, $this->getContextTitle() ); |
2173 | 2168 | } |
2174 | 2169 | |
— | — | @@ -2492,13 +2487,12 @@ |
2493 | 2488 | * minor and watch |
2494 | 2489 | * |
2495 | 2490 | * @param $tabindex Current tabindex |
2496 | | - * @param $skin Skin object |
2497 | 2491 | * @param $checked Array of checkbox => bool, where bool indicates the checked |
2498 | 2492 | * status of the checkbox |
2499 | 2493 | * |
2500 | 2494 | * @return array |
2501 | 2495 | */ |
2502 | | - public function getCheckboxes( &$tabindex, $skin, $checked ) { |
| 2496 | + public function getCheckboxes( &$tabindex, $checked ) { |
2503 | 2497 | global $wgUser; |
2504 | 2498 | |
2505 | 2499 | $checkboxes = array(); |
— | — | @@ -2516,7 +2510,7 @@ |
2517 | 2511 | $checkboxes['minor'] = |
2518 | 2512 | Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) . |
2519 | 2513 | " <label for='wpMinoredit' id='mw-editpage-minoredit'" . |
2520 | | - Xml::expandAttributes( array( 'title' => $skin->titleAttrib( 'minoredit', 'withaccess' ) ) ) . |
| 2514 | + Xml::expandAttributes( array( 'title' => Linker::titleAttrib( 'minoredit', 'withaccess' ) ) ) . |
2521 | 2515 | ">{$minorLabel}</label>"; |
2522 | 2516 | } |
2523 | 2517 | } |
— | — | @@ -2532,7 +2526,7 @@ |
2533 | 2527 | $checkboxes['watch'] = |
2534 | 2528 | Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) . |
2535 | 2529 | " <label for='wpWatchthis' id='mw-editpage-watch'" . |
2536 | | - Xml::expandAttributes( array( 'title' => $skin->titleAttrib( 'watch', 'withaccess' ) ) ) . |
| 2530 | + Xml::expandAttributes( array( 'title' => Linker::titleAttrib( 'watch', 'withaccess' ) ) ) . |
2537 | 2531 | ">{$watchLabel}</label>"; |
2538 | 2532 | } |
2539 | 2533 | wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, &$checkboxes, &$tabindex ) ); |
— | — | @@ -2623,19 +2617,16 @@ |
2624 | 2618 | * @return string |
2625 | 2619 | */ |
2626 | 2620 | public function getCancelLink() { |
2627 | | - global $wgUser; |
2628 | | - |
2629 | 2621 | $cancelParams = array(); |
2630 | 2622 | if ( !$this->isConflict && $this->mArticle->getOldID() > 0 ) { |
2631 | 2623 | $cancelParams['oldid'] = $this->mArticle->getOldID(); |
2632 | 2624 | } |
2633 | 2625 | |
2634 | | - return $wgUser->getSkin()->link( |
| 2626 | + return Linker::linkKnown( |
2635 | 2627 | $this->getContextTitle(), |
2636 | 2628 | wfMsgExt( 'cancel', array( 'parseinline' ) ), |
2637 | 2629 | array( 'id' => 'mw-editform-cancel' ), |
2638 | | - $cancelParams, |
2639 | | - array( 'known', 'noclasses' ) |
| 2630 | + $cancelParams |
2640 | 2631 | ); |
2641 | 2632 | } |
2642 | 2633 | |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2019,15 +2019,14 @@ |
2020 | 2020 | $this->setArticleRelated( false ); |
2021 | 2021 | |
2022 | 2022 | $loginTitle = SpecialPage::getTitleFor( 'Userlogin' ); |
2023 | | - $loginLink = Linker::link( |
| 2023 | + $loginLink = Linker::linkKnown( |
2024 | 2024 | $loginTitle, |
2025 | 2025 | wfMsgHtml( 'loginreqlink' ), |
2026 | 2026 | array(), |
2027 | | - array( 'returnto' => $this->getTitle()->getPrefixedText() ), |
2028 | | - array( 'known', 'noclasses' ) |
| 2027 | + array( 'returnto' => $this->getTitle()->getPrefixedText() ) |
2029 | 2028 | ); |
2030 | | - $this->addWikiMsgArray( 'loginreqpagetext', array( $loginLink ), array( 'replaceafter' ) ); |
2031 | | - $this->addHTML( "\n<!--" . $this->getTitle()->getPrefixedUrl() . '-->' ); |
| 2029 | + $this->addHTML( wfMessage( 'loginreqpagetext' )->rawParams( $loginLink )->parse() . |
| 2030 | + "\n<!--" . $this->getTitle()->getPrefixedUrl() . '-->' ); |
2032 | 2031 | |
2033 | 2032 | # Don't return to the main page if the user can't read it |
2034 | 2033 | # otherwise we'll end up in a pointless loop |
Index: trunk/phase3/includes/actions/RollbackAction.php |
— | — | @@ -63,8 +63,8 @@ |
64 | 64 | $current = $details['current']; |
65 | 65 | |
66 | 66 | if ( $current->getComment() != '' ) { |
67 | | - $this->getOutput()->addWikiMsgArray( 'editcomment', array( |
68 | | - Linker::formatComment( $current->getComment() ) ), array( 'replaceafter' ) ); |
| 67 | + $this->getOutput()->addHTML( wfMessage( 'editcomment' )->rawParams( |
| 68 | + Linker::formatComment( $current->getComment() ) )->parse() ); |
69 | 69 | } |
70 | 70 | } |
71 | 71 | |