Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1596,12 +1596,9 @@ |
1597 | 1597 | * @param bool $section Whether this is for a section edit |
1598 | 1598 | * @return string HTML output |
1599 | 1599 | */ |
1600 | | - public function formatTemplates( $templates, $preview = false, $section = false) { |
1601 | | - global $wgUser; |
| 1600 | + public function formatTemplates( $templates, $preview = false, $section = false ) { |
1602 | 1601 | wfProfileIn( __METHOD__ ); |
1603 | 1602 | |
1604 | | - $sk = $wgUser->getSkin(); |
1605 | | - |
1606 | 1603 | $outText = ''; |
1607 | 1604 | if ( count( $templates ) > 0 ) { |
1608 | 1605 | # Do a batch existence check |
— | — | @@ -1620,7 +1617,7 @@ |
1621 | 1618 | } else { |
1622 | 1619 | $outText .= wfMsgExt( 'templatesused', array( 'parse' ) ); |
1623 | 1620 | } |
1624 | | - $outText .= '</div><ul>'; |
| 1621 | + $outText .= "</div><ul>\n"; |
1625 | 1622 | |
1626 | 1623 | usort( $templates, array( 'Title', 'compare' ) ); |
1627 | 1624 | foreach ( $templates as $titleObj ) { |
— | — | @@ -1633,13 +1630,13 @@ |
1634 | 1631 | $protected = ''; |
1635 | 1632 | } |
1636 | 1633 | if( $titleObj->quickUserCan( 'edit' ) ) { |
1637 | | - $editLink = $sk->link( $titleObj, wfMsg( 'editlink' ), array(), array( 'action' => 'edit' ), 'known' ); |
| 1634 | + $editLink = $this->link( $titleObj, wfMsgHtml( 'editlink' ), array(), array( 'action' => 'edit' ), 'known' ); |
1638 | 1635 | } else { |
1639 | | - $editLink = $sk->link( $titleObj, wfMsg( 'viewsourcelink' ), array(), array( 'action' => 'edit' ), 'known' ); |
| 1636 | + $editLink = $this->link( $titleObj, wfMsgHtml( 'viewsourcelink' ), array(), array( 'action' => 'edit' ), 'known' ); |
1640 | 1637 | } |
1641 | | - $talkLink = $sk->link( $titleObj->getTalkPage(), wfMsg( 'talkpagelinktext' ) ); |
| 1638 | + $talkLink = $this->link( $titleObj->getTalkPage(), wfMsgHtml( 'talkpagelinktext' ) ); |
1642 | 1639 | $outText .= Xml::tags( 'li', array(), |
1643 | | - $sk->link( $titleObj ) . ' (' . $editLink . ' ' . wfMsg( 'pipe-separator' ) . ' ' . $talkLink . ') ' . $protected ); |
| 1640 | + $this->link( $titleObj ) . ' (' . $editLink . ' ' . wfMsgHtml( 'pipe-separator' ) . ' ' . $talkLink . ') ' . $protected ) . "\n"; |
1644 | 1641 | } |
1645 | 1642 | $outText .= '</ul>'; |
1646 | 1643 | } |
— | — | @@ -1654,21 +1651,19 @@ |
1655 | 1652 | * or similar |
1656 | 1653 | * @return string HTML output |
1657 | 1654 | */ |
1658 | | - public function formatHiddenCategories( $hiddencats) { |
1659 | | - global $wgUser, $wgLang; |
| 1655 | + public function formatHiddenCategories( $hiddencats ) { |
| 1656 | + global $wgLang; |
1660 | 1657 | wfProfileIn( __METHOD__ ); |
1661 | 1658 | |
1662 | | - $sk = $wgUser->getSkin(); |
1663 | | - |
1664 | 1659 | $outText = ''; |
1665 | 1660 | if ( count( $hiddencats ) > 0 ) { |
1666 | 1661 | # Construct the HTML |
1667 | 1662 | $outText = '<div class="mw-hiddenCategoriesExplanation">'; |
1668 | 1663 | $outText .= wfMsgExt( 'hiddencategories', array( 'parse' ), $wgLang->formatnum( count( $hiddencats ) ) ); |
1669 | | - $outText .= '</div><ul>'; |
| 1664 | + $outText .= "</div><ul>\n"; |
1670 | 1665 | |
1671 | 1666 | foreach ( $hiddencats as $titleObj ) { |
1672 | | - $outText .= '<li>' . $sk->link( $titleObj, null, array(), array(), 'known' ) . '</li>'; # If it's hidden, it must exist - no need to check with a LinkBatch |
| 1667 | + $outText .= '<li>' . $this->link( $titleObj, null, array(), array(), 'known' ) . "</li>\n"; # If it's hidden, it must exist - no need to check with a LinkBatch |
1673 | 1668 | } |
1674 | 1669 | $outText .= '</ul>'; |
1675 | 1670 | } |