Index: trunk/phase3/includes/CategoryPage.php |
— | — | @@ -86,7 +86,7 @@ |
87 | 87 | $children, $children_start_char, |
88 | 88 | $showGallery, $imgsNoGalley, |
89 | 89 | $imgsNoGallery_start_char, |
90 | | - $skin, $imgsNoGallery; |
| 90 | + $imgsNoGallery; |
91 | 91 | |
92 | 92 | /** |
93 | 93 | * @var |
— | — | @@ -201,24 +201,13 @@ |
202 | 202 | } |
203 | 203 | |
204 | 204 | /** |
205 | | - * @return Skin |
206 | | - */ |
207 | | - function getSkin() { |
208 | | - if ( !$this->skin ) { |
209 | | - global $wgUser; |
210 | | - $this->skin = $wgUser->getSkin(); |
211 | | - } |
212 | | - return $this->skin; |
213 | | - } |
214 | | - |
215 | | - /** |
216 | 205 | * Add a subcategory to the internal lists, using a Category object |
217 | 206 | */ |
218 | 207 | function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) { |
219 | 208 | // Subcategory; strip the 'Category' namespace from the link text. |
220 | 209 | $title = $cat->getTitle(); |
221 | 210 | |
222 | | - $link = $this->getSkin()->link( $title, $title->getText() ); |
| 211 | + $link = Linker::link( $title, htmlspecialchars( $title->getText() ) ); |
223 | 212 | if ( $title->isRedirect() ) { |
224 | 213 | // This didn't used to add redirect-in-category, but might |
225 | 214 | // as well be consistent with the rest of the sections |
— | — | @@ -276,7 +265,7 @@ |
277 | 266 | $this->gallery->add( $title ); |
278 | 267 | } |
279 | 268 | } else { |
280 | | - $link = $this->getSkin()->link( $title ); |
| 269 | + $link = Linker::link( $title ); |
281 | 270 | if ( $isRedirect ) { |
282 | 271 | // This seems kind of pointless given 'mw-redirect' class, |
283 | 272 | // but keeping for back-compatibility with user css. |
— | — | @@ -295,7 +284,7 @@ |
296 | 285 | function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) { |
297 | 286 | global $wgContLang; |
298 | 287 | |
299 | | - $link = $this->getSkin()->link( $title ); |
| 288 | + $link = Linker::link( $title ); |
300 | 289 | if ( $isRedirect ) { |
301 | 290 | // This seems kind of pointless given 'mw-redirect' class, |
302 | 291 | // but keeping for back-compatiability with user css. |
— | — | @@ -615,7 +604,7 @@ |
616 | 605 | */ |
617 | 606 | private function pagingLinks( $first, $last, $type = '' ) { |
618 | 607 | global $wgLang; |
619 | | - $sk = $this->getSkin(); |
| 608 | + |
620 | 609 | $limitText = $wgLang->formatNum( $this->limit ); |
621 | 610 | |
622 | 611 | $prevLink = wfMsgExt( 'prevn', array( 'escape', 'parsemag' ), $limitText ); |
— | — | @@ -624,7 +613,7 @@ |
625 | 614 | $prevQuery = $this->query; |
626 | 615 | $prevQuery["{$type}until"] = $first; |
627 | 616 | unset( $prevQuery["{$type}from"] ); |
628 | | - $prevLink = $sk->linkKnown( |
| 617 | + $prevLink = Linker::linkKnown( |
629 | 618 | $this->addFragmentToTitle( $this->title, $type ), |
630 | 619 | $prevLink, |
631 | 620 | array(), |
— | — | @@ -638,7 +627,7 @@ |
639 | 628 | $lastQuery = $this->query; |
640 | 629 | $lastQuery["{$type}from"] = $last; |
641 | 630 | unset( $lastQuery["{$type}until"] ); |
642 | | - $nextLink = $sk->linkKnown( |
| 631 | + $nextLink = Linker::linkKnown( |
643 | 632 | $this->addFragmentToTitle( $this->title, $type ), |
644 | 633 | $nextLink, |
645 | 634 | array(), |