r93324 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93323‎ | r93324 | r93325 >
Date:22:34, 27 July 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialWantedProperties.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/QueryPages/SMW_SpecialWantedProperties.php
@@ -64,13 +64,19 @@
6565 return '<p>' . wfMsg( 'smw_wantedproperties_docu' ) . "</p><br />\n";
6666 }
6767
 68+ /**
 69+ * @param $skin
 70+ * @param array $result First item is SMWDIProperty, second item is int
 71+ *
 72+ * @return string
 73+ */
6874 function formatResult( $skin, $result ) {
6975 $linker = smwfGetLinker();
7076
7177 if ( $result[0]->isUserDefined() ) {
72 - $proplink = $linker->makeLinkObj( $result[0]->getWikiPageValue()->getTitle(), htmlspecialchars( $result[0]->getWikiValue() ), 'action=view' );
 78+ $proplink = $linker->makeLinkObj( $result[0]->getDiWikiPage()->getTitle(), htmlspecialchars( $result[0]->getLabel() ), 'action=view' );
7379 } else {
74 - $proplink = $result[0]->getLongHTMLText( $linker );
 80+ $proplink = SMWDataValueFactory::newDataItemValue( $result[0], new SMWDIProperty( '_TYPE' ) )->getLongHTMLText( $linker );
7581 }
7682
7783 return wfMsgExt( 'smw_wantedproperty_template', array( 'parsemag' ), $proplink, $result[1] );
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_Store.php
@@ -375,7 +375,7 @@
376376 *
377377 * @param SMWRequestOptions $requestoptions
378378 *
379 - * @return array
 379+ * @return array of array( SMWDIProperty, int )
380380 */
381381 public abstract function getWantedPropertiesSpecial( $requestoptions = null );
382382
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
@@ -1134,7 +1134,7 @@
11351135 *
11361136 * @param SMWRequestOptions $requestoptions
11371137 *
1138 - * @return array
 1138+ * @return array of array( SMWDIProperty, int )
11391139 */
11401140 public function getWantedPropertiesSpecial( $requestoptions = null ) {
11411141 global $smwgPDefaultType;