Index: trunk/phase3/includes/specials/SpecialTags.php |
— | — | @@ -36,11 +36,10 @@ |
37 | 37 | } |
38 | 38 | |
39 | 39 | function execute( $par ) { |
40 | | - global $wgOut; |
| 40 | + $out = $this->getOutput(); |
| 41 | + $out->setPageTitle( wfMsg( 'tags-title' ) ); |
| 42 | + $out->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 'tags-intro' ); |
41 | 43 | |
42 | | - $wgOut->setPageTitle( wfMsg( 'tags-title' ) ); |
43 | | - $wgOut->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 'tags-intro' ); |
44 | | - |
45 | 44 | // Write the headers |
46 | 45 | $html = Xml::tags( 'tr', null, Xml::tags( 'th', null, wfMsgExt( 'tags-tag', 'parseinline' ) ) . |
47 | 46 | Xml::tags( 'th', null, wfMsgExt( 'tags-display-header', 'parseinline' ) ) . |
— | — | @@ -59,35 +58,30 @@ |
60 | 59 | $html .= $this->doTagRow( $tag, 0 ); |
61 | 60 | } |
62 | 61 | |
63 | | - $wgOut->addHTML( Xml::tags( 'table', array( 'class' => 'wikitable mw-tags-table' ), $html ) ); |
| 62 | + $out->addHTML( Xml::tags( 'table', array( 'class' => 'wikitable mw-tags-table' ), $html ) ); |
64 | 63 | } |
65 | 64 | |
66 | 65 | function doTagRow( $tag, $hitcount ) { |
67 | | - static $sk = null, $doneTags = array(); |
68 | | - if ( !$sk ) { |
69 | | - $sk = $this->getSkin(); |
70 | | - } |
| 66 | + static $doneTags = array(); |
71 | 67 | |
72 | 68 | if ( in_array( $tag, $doneTags ) ) { |
73 | 69 | return ''; |
74 | 70 | } |
75 | 71 | |
76 | | - global $wgLang; |
77 | | - |
78 | 72 | $newRow = ''; |
79 | 73 | $newRow .= Xml::tags( 'td', null, Xml::element( 'tt', null, $tag ) ); |
80 | 74 | |
81 | 75 | $disp = ChangeTags::tagDescription( $tag ); |
82 | | - $disp .= ' (' . $sk->link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag" ), wfMsgHtml( 'tags-edit' ) ) . ')'; |
| 76 | + $disp .= ' (' . Linker::link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag" ), wfMsgHtml( 'tags-edit' ) ) . ')'; |
83 | 77 | $newRow .= Xml::tags( 'td', null, $disp ); |
84 | 78 | |
85 | 79 | $msg = wfMessage( "tag-$tag-description" ); |
86 | 80 | $desc = !$msg->exists() ? '' : $msg->parse(); |
87 | | - $desc .= ' (' . $sk->link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag-description" ), wfMsgHtml( 'tags-edit' ) ) . ')'; |
| 81 | + $desc .= ' (' . Linker::link( Title::makeTitle( NS_MEDIAWIKI, "Tag-$tag-description" ), wfMsgHtml( 'tags-edit' ) ) . ')'; |
88 | 82 | $newRow .= Xml::tags( 'td', null, $desc ); |
89 | 83 | |
90 | | - $hitcount = wfMsgExt( 'tags-hitcount', array( 'parsemag' ), $wgLang->formatNum( $hitcount ) ); |
91 | | - $hitcount = $sk->link( SpecialPage::getTitleFor( 'Recentchanges' ), $hitcount, array(), array( 'tagfilter' => $tag ) ); |
| 84 | + $hitcount = wfMsgExt( 'tags-hitcount', array( 'parsemag' ), $this->getLang()->formatNum( $hitcount ) ); |
| 85 | + $hitcount = Linker::link( SpecialPage::getTitleFor( 'Recentchanges' ), $hitcount, array(), array( 'tagfilter' => $tag ) ); |
92 | 86 | $newRow .= Xml::tags( 'td', null, $hitcount ); |
93 | 87 | |
94 | 88 | $doneTags[] = $tag; |