r88931 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88930‎ | r88931 | r88932 >
Date:20:43, 26 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
Another fix for SMW 1.6
Modified paths:
  • /trunk/extensions/SemanticDrilldown/includes/SD_Filter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/includes/SD_Filter.php
@@ -43,11 +43,14 @@
4444 global $smwgContLang;
4545 $datatypeLabels = $smwgContLang->getDatatypeLabels();
4646 if ( count( $types ) > 0 ) {
47 - // SMW 1.6
4847 if ( $types[0] instanceof SMWDIWikiPage ) {
 48+ // SMW 1.6
4949 $typeValue = $types[0]->getDBkey();
5050 } elseif ( $types[0] instanceof SMWDIURI ) {
51 - $typeValue = $types[0]->getURI();
 51+ // A bit inefficient, but it's the
 52+ // simplest approach.
 53+ $typeID = $types[0]->getFragment();
 54+ $typeValue = $datatypeLabels[$typeID];
5255 } else {
5356 $typeValue = $types[0]->getWikiValue();
5457 }

Status & tagging log