Index: trunk/phase3/includes/Skin.php |
— | — | @@ -474,6 +474,11 @@ |
475 | 475 | */ |
476 | 476 | abstract function setupSkinUserCss( OutputPage $out ); |
477 | 477 | |
| 478 | + /** |
| 479 | + * TODO: document |
| 480 | + * @param $title Title |
| 481 | + * @return String |
| 482 | + */ |
478 | 483 | function getPageClasses( $title ) { |
479 | 484 | $numeric = 'ns-' . $title->getNamespace(); |
480 | 485 | |
— | — | @@ -542,7 +547,7 @@ |
543 | 548 | |
544 | 549 | $msg = wfMsgExt( 'pagecategories', array( 'parsemag', 'escapenoentities' ), count( $allCats['normal'] ) ); |
545 | 550 | $s .= '<div id="mw-normal-catlinks">' . |
546 | | - $this->link( Title::newFromText( wfMsgForContent( 'pagecategorieslink' ) ), $msg ) |
| 551 | + Linker::link( Title::newFromText( wfMsgForContent( 'pagecategorieslink' ) ), $msg ) |
547 | 552 | . $colon . $t . '</div>'; |
548 | 553 | } |
549 | 554 | |
— | — | @@ -585,10 +590,9 @@ |
586 | 591 | /** |
587 | 592 | * Render the array as a serie of links. |
588 | 593 | * @param $tree Array: categories tree returned by Title::getParentCategoryTree |
589 | | - * @param &skin Object: skin passed by reference |
590 | 594 | * @return String separated by >, terminate with "\n" |
591 | 595 | */ |
592 | | - function drawCategoryBrowser( $tree, &$skin ) { |
| 596 | + function drawCategoryBrowser( $tree ) { |
593 | 597 | $return = ''; |
594 | 598 | |
595 | 599 | foreach ( $tree as $element => $parent ) { |
— | — | @@ -597,12 +601,12 @@ |
598 | 602 | $return .= "\n"; |
599 | 603 | } else { |
600 | 604 | # grab the others elements |
601 | | - $return .= $this->drawCategoryBrowser( $parent, $skin ) . ' > '; |
| 605 | + $return .= $this->drawCategoryBrowser( $parent ) . ' > '; |
602 | 606 | } |
603 | 607 | |
604 | 608 | # add our current element to the list |
605 | 609 | $eltitle = Title::newFromText( $element ); |
606 | | - $return .= $skin->link( $eltitle, $eltitle->getText() ); |
| 610 | + $return .= Linker::link( $eltitle, $eltitle->getText() ); |
607 | 611 | } |
608 | 612 | |
609 | 613 | return $return; |
— | — | @@ -769,7 +773,7 @@ |
770 | 774 | |
771 | 775 | return wfMsg( |
772 | 776 | $msg, |
773 | | - $this->link( |
| 777 | + Linker::link( |
774 | 778 | SpecialPage::getTitleFor( 'Undelete', $this->getTitle()->getPrefixedDBkey() ), |
775 | 779 | wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $this->getContext()->getLang()->formatNum( $n ) ), |
776 | 780 | array(), |
— | — | @@ -878,9 +882,9 @@ |
879 | 883 | |
880 | 884 | if ( $wgRightsPage ) { |
881 | 885 | $title = Title::newFromText( $wgRightsPage ); |
882 | | - $link = $this->linkKnown( $title, $wgRightsText ); |
| 886 | + $link = Linker::linkKnown( $title, $wgRightsText ); |
883 | 887 | } elseif ( $wgRightsUrl ) { |
884 | | - $link = $this->makeExternalLink( $wgRightsUrl, $wgRightsText ); |
| 888 | + $link = Linker::makeExternalLink( $wgRightsUrl, $wgRightsText ); |
885 | 889 | } elseif ( $wgRightsText ) { |
886 | 890 | $link = $wgRightsText; |
887 | 891 | } else { |
— | — | @@ -1014,7 +1018,7 @@ |
1015 | 1019 | * @return string |
1016 | 1020 | */ |
1017 | 1021 | function mainPageLink() { |
1018 | | - $s = $this->link( |
| 1022 | + $s = Linker::link( |
1019 | 1023 | Title::newMainPage(), |
1020 | 1024 | wfMsg( 'mainpage' ), |
1021 | 1025 | array(), |
— | — | @@ -1036,7 +1040,7 @@ |
1037 | 1041 | // but we make the link target be the one site-wide page. |
1038 | 1042 | $title = Title::newFromText( wfMsgForContent( $page ) ); |
1039 | 1043 | |
1040 | | - return $this->linkKnown( |
| 1044 | + return Linker::linkKnown( |
1041 | 1045 | $title, |
1042 | 1046 | wfMsgExt( $desc, array( 'parsemag', 'escapenoentities' ) ) |
1043 | 1047 | ); |