r65586 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65585‎ | r65586 | r65587 >
Date:21:02, 27 April 2010
Author:yaron
Status:deferred
Tags:
Comment:
Added backward-compatibility for deprecated SMW function
Modified paths:
  • /trunk/extensions/SemanticDrilldown/includes/SD_Utils.inc (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/includes/SD_Utils.inc
@@ -121,7 +121,13 @@
122122 $res = $store->getPropertyValues( $subject_title, $property );
123123 $values = array();
124124 foreach ( $res as $prop_val ) {
125 - $values[] = html_entity_decode( str_replace( '_', ' ', $prop_val->getValueKey() ) );
 125+ // depends on version of SMW
 126+ if ( method_exists( $prop_val, 'getValueKey' ) ) {
 127+ $actual_val = $prop_val->getValueKey();
 128+ } else {
 129+ $actual_val = $prop_val->getXSDValue();
 130+ }
 131+ $values[] = html_entity_decode( str_replace( '_', ' ', $actual_val ) );
126132 }
127133 return $values;
128134 }

Status & tagging log