From e76c7823c144bd4209ff299bf9196d3796f8adcd Mon Sep 17 00:00:00 2001 From: Happy-melon Date: Sat, 16 Apr 2011 20:01:39 +0000 Subject: [PATCH] Update Skin.php to not call the now-separate Linker methods via $this->foo(). --- includes/Skin.php | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/includes/Skin.php b/includes/Skin.php index 5b1eedbc19..2114849ce7 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -474,6 +474,11 @@ abstract class Skin { */ abstract function setupSkinUserCss( OutputPage $out ); + /** + * TODO: document + * @param $title Title + * @return String + */ function getPageClasses( $title ) { $numeric = 'ns-' . $title->getNamespace(); @@ -542,7 +547,7 @@ abstract class Skin { $msg = wfMsgExt( 'pagecategories', array( 'parsemag', 'escapenoentities' ), count( $allCats['normal'] ) ); $s .= ''; } @@ -585,10 +590,9 @@ abstract class Skin { /** * Render the array as a serie of links. * @param $tree Array: categories tree returned by Title::getParentCategoryTree - * @param &skin Object: skin passed by reference * @return String separated by >, terminate with "\n" */ - function drawCategoryBrowser( $tree, &$skin ) { + function drawCategoryBrowser( $tree ) { $return = ''; foreach ( $tree as $element => $parent ) { @@ -597,12 +601,12 @@ abstract class Skin { $return .= "\n"; } else { # grab the others elements - $return .= $this->drawCategoryBrowser( $parent, $skin ) . ' > '; + $return .= $this->drawCategoryBrowser( $parent ) . ' > '; } # add our current element to the list $eltitle = Title::newFromText( $element ); - $return .= $skin->link( $eltitle, $eltitle->getText() ); + $return .= Linker::link( $eltitle, $eltitle->getText() ); } return $return; @@ -769,7 +773,7 @@ abstract class Skin { return wfMsg( $msg, - $this->link( + Linker::link( SpecialPage::getTitleFor( 'Undelete', $this->getTitle()->getPrefixedDBkey() ), wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $this->getContext()->getLang()->formatNum( $n ) ), array(), @@ -878,9 +882,9 @@ abstract class Skin { if ( $wgRightsPage ) { $title = Title::newFromText( $wgRightsPage ); - $link = $this->linkKnown( $title, $wgRightsText ); + $link = Linker::linkKnown( $title, $wgRightsText ); } elseif ( $wgRightsUrl ) { - $link = $this->makeExternalLink( $wgRightsUrl, $wgRightsText ); + $link = Linker::makeExternalLink( $wgRightsUrl, $wgRightsText ); } elseif ( $wgRightsText ) { $link = $wgRightsText; } else { @@ -1014,7 +1018,7 @@ abstract class Skin { * @return string */ function mainPageLink() { - $s = $this->link( + $s = Linker::link( Title::newMainPage(), wfMsg( 'mainpage' ), array(), @@ -1036,7 +1040,7 @@ abstract class Skin { // but we make the link target be the one site-wide page. $title = Title::newFromText( wfMsgForContent( $page ) ); - return $this->linkKnown( + return Linker::linkKnown( $title, wfMsgExt( $desc, array( 'parsemag', 'escapenoentities' ) ) ); -- 2.20.1