r89428 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89427‎ | r89428 | r89429 >
Date:17:43, 3 June 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
replace skin by linker
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_OrderedListPage.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_PropertyPage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_OrderedListPage.php
@@ -106,19 +106,6 @@
107107 protected abstract function getHtml();
108108
109109 /**
110 - * Fetch and return the relevant skin object.
111 - *
112 - * @return Skin
113 - */
114 - protected function getSkin() {
115 - global $wgUser;
116 - if ( !$this->skin ) {
117 - $this->skin = $wgUser->getSkin();
118 - }
119 - return $this->skin;
120 - }
121 -
122 - /**
123110 * Like Article's getTitle(), but returning a suitable SMWDIWikiPage.
124111 *
125112 * @return SMWDIWikiPage
Index: trunk/extensions/SemanticMediaWiki/includes/articlepages/SMW_PropertyPage.php
@@ -158,8 +158,8 @@
159159
160160 // Property name
161161 $searchlink = SMWInfolink::newBrowsingLink( '+', $dvWikiPage->getShortHTMLText() );
162 - $r .= '<tr><td class="smwpropname">' . $dvWikiPage->getLongHTMLText( $this->getSkin() ) .
163 - '&#160;' . $searchlink->getHTML( $this->getSkin() ) . '</td><td class="smwprops">';
 162+ $r .= '<tr><td class="smwpropname">' . $dvWikiPage->getLongHTMLText( smwfGetLinker() ) .
 163+ '&#160;' . $searchlink->getHTML( smwfGetLinker() ) . '</td><td class="smwprops">';
164164
165165 // Property values
166166 $ropts = new SMWRequestOptions();
@@ -175,10 +175,10 @@
176176
177177 if ( $i < $smwgMaxPropertyValues + 1 ) {
178178 $dv = SMWDataValueFactory::newDataItemValue( $di, $this->mProperty );
179 - $r .= $dv->getLongHTMLText( $this->getSkin() ) . $dv->getInfolinkText( SMW_OUTPUT_HTML, $this->getSkin() );
 179+ $r .= $dv->getLongHTMLText( smwfGetLinker() ) . $dv->getInfolinkText( SMW_OUTPUT_HTML, smwfGetLinker() );
180180 } else {
181181 $searchlink = SMWInfolink::newInversePropertySearchLink( '…', $dvWikiPage->getWikiValue(), $this->mTitle->getText() );
182 - $r .= $searchlink->getHTML( $this->getSkin() );
 182+ $r .= $searchlink->getHTML( smwfGetLinker() );
183183 }
184184 }
185185

Status & tagging log