r105986 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r105985‎ | r105986 | r105987 >
Date:05:22, 13 December 2011
Author:jeroendedauw
Status:ok
Tags:
Comment:
kill makeKnownLinkObj
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Infolink.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_PageLister.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialProperties.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialUnusedProperties.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialProperties.php
@@ -74,7 +74,7 @@
7575 $typeDataValue = SMWDataValueFactory::newDataItemValue( current( $types ), $typeProperty );
7676 $typestring = $typeDataValue->getLongHTMLText( $linker );
7777 }
78 - $proplink = $linker->makeKnownLinkObj( $title, $result[0]->getLabel() );
 78+ $proplink = $linker->link( $title, $result[0]->getLabel() );
7979 } elseif ( $result[0]->isUserDefined() && !is_null( $title ) ) {
8080 $errors[] = wfMsg( 'smw_propertylackspage' );
8181 $proplink = $linker->makeBrokenLinkObj( $title, $result[0]->getLabel(), 'action=view' );
Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialUnusedProperties.php
@@ -66,7 +66,7 @@
6767 function formatResult( $skin, /* SMWDIProperty */ $result ) {
6868 $linker = smwfGetLinker();
6969
70 - $proplink = $linker->makeKnownLinkObj(
 70+ $proplink = $linker->link(
7171 $result->getDiWikiPage()->getTitle(),
7272 $result->getLabel()
7373 );
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Infolink.php
@@ -232,7 +232,7 @@
233233 if ( $outputformat == SMW_OUTPUT_WIKI ) {
234234 $link = "[[$titletext|$this->mCaption]]";
235235 } else { // SMW_OUTPUT_HTML, SMW_OUTPUT_FILE
236 - $link = $this->getLinker( $linker )->makeKnownLinkObj( $title, $this->mCaption );
 236+ $link = $this->getLinker( $linker )->link( $title, $this->mCaption );
237237 }
238238 } else { // Title creation failed, maybe illegal symbols or too long; make a direct URL link
239239 // (only possible if offending target parts belong to some parameter
@@ -244,7 +244,7 @@
245245 if ( $outputformat == SMW_OUTPUT_WIKI ) {
246246 $link = '[' . $title->getFullURL( SMWInfolink::encodeParameters( $this->mParams, false ) ) . " $this->mCaption]";
247247 } else { // SMW_OUTPUT_HTML, SMW_OUTPUT_FILE
248 - $link = $this->getLinker( $linker )->makeKnownLinkObj(
 248+ $link = $this->getLinker( $linker )->link(
249249 $title,
250250 $this->mCaption,
251251 SMWInfolink::encodeParameters( $this->mParams, false )
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_PageLister.php
@@ -100,7 +100,7 @@
101101 * @return string
102102 */
103103 protected function makeSelfLink( Title $title, $linkText, array $parameters ) {
104 - return smwfGetLinker()->makeKnownLinkObj( $title, $linkText, wfArrayToCGI( $parameters ) );
 104+ return smwfGetLinker()->link( $title, $linkText, wfArrayToCGI( $parameters ) );
105105 }
106106
107107 /**

Status & tagging log