r90593 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r90592‎ | r90593 | r90594 >
Date:18:24, 22 June 2011
Author:ialex
Status:ok
Tags:
Comment:
Updated calls to Linker to call them statically and removed useless parameter to OutputPage::getSkin()
Modified paths:
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/OutputPage.php
@@ -1129,7 +1129,7 @@
11301130 }
11311131 $text = $wgContLang->convertHtml( $title->getText() );
11321132 $this->mCategories[] = $title->getText();
1133 - $this->mCategoryLinks[$type][] = $this->getSkin()->link( $title, $text );
 1133+ $this->mCategoryLinks[$type][] = Linker::link( $title, $text );
11341134 }
11351135 }
11361136 }
@@ -1919,7 +1919,7 @@
19201920 } else {
19211921 $this->addDefaultModules();
19221922
1923 - $sk = $this->getSkin( $this->getTitle() );
 1923+ $sk = $this->getSkin();
19241924
19251925 // Hook that allows last minute changes to the output page, e.g.
19261926 // adding of CSS or Javascript by extensions.
@@ -2035,7 +2035,7 @@
20362036 $this->setArticleRelated( false );
20372037
20382038 $loginTitle = SpecialPage::getTitleFor( 'Userlogin' );
2039 - $loginLink = $this->getSkin()->link(
 2039+ $loginLink = Linker::link(
20402040 $loginTitle,
20412041 wfMsgHtml( 'loginreqlink' ),
20422042 array(),
@@ -2125,7 +2125,7 @@
21262126 if( $source ) {
21272127 $this->setPageTitle( wfMsg( 'viewsource' ) );
21282128 $this->setSubtitle(
2129 - wfMsg( 'viewsourcefor', $this->getSkin()->linkKnown( $this->getTitle() ) )
 2129+ wfMsg( 'viewsourcefor', Linker::linkKnown( $this->getTitle() ) )
21302130 );
21312131 } else {
21322132 $this->setPageTitle( wfMsg( 'badaccess' ) );
@@ -2150,10 +2150,10 @@
21512151 $this->addHTML( Html::element( 'textarea', $params, $source ) );
21522152
21532153 // Show templates used by this article
2154 - $skin = $this->getSkin();
21552154 $article = new Article( $this->getTitle() );
 2155+ $templates = Linker::formatTemplates( $article->getUsedTemplates() );
21562156 $this->addHTML( "<div class='templatesUsed'>
2157 -{$skin->formatTemplates( $article->getUsedTemplates() )}
 2157+$templates
21582158 </div>
21592159 " );
21602160 }
@@ -2234,7 +2234,7 @@
22352235 $this->addLink( array( 'rel' => 'next', 'href' => $title->getFullURL() ) );
22362236 $link = wfMsgHtml(
22372237 'returnto',
2238 - $this->getSkin()->link( $title, $text, array(), $query )
 2238+ Linker::link( $title, $text, array(), $query )
22392239 );
22402240 $this->addHTML( "<p id=\"mw-returnto\">{$link}</p>\n" );
22412241 }

Status & tagging log