Index: trunk/extensions/SemanticDrilldown/includes/SD_Utils.php |
— | — | @@ -84,11 +84,24 @@ |
85 | 85 | $options->limit = 10000; |
86 | 86 | $used_properties = smwfGetStore()->getPropertiesSpecial( $options ); |
87 | 87 | foreach ( $used_properties as $property ) { |
88 | | - $all_properties[] = $property[0]->getWikiValue(); |
| 88 | + if ( $property[0] instanceof SMWDIProperty ) { |
| 89 | + // SMW 1.6+ |
| 90 | + $propName = $property[0]->getKey(); |
| 91 | + if ( $propName{0} != '_' ) { |
| 92 | + $all_properties[] = str_replace( '_', ' ', $propName ); |
| 93 | + } |
| 94 | + } else { |
| 95 | + $all_properties[] = $property[0]->getWikiValue(); |
| 96 | + } |
89 | 97 | } |
90 | 98 | $unused_properties = smwfGetStore()->getUnusedPropertiesSpecial( $options ); |
91 | 99 | foreach ( $unused_properties as $property ) { |
92 | | - $all_properties[] = $property->getWikiValue(); |
| 100 | + if ( $property instanceof SMWDIProperty ) { |
| 101 | + // SMW 1.6+ |
| 102 | + $all_properties[] = str_replace( '_', ' ', $property->getKey() ); |
| 103 | + } else { |
| 104 | + $all_properties[] = $property->getWikiValue(); |
| 105 | + } |
93 | 106 | } |
94 | 107 | // remove the special properties of Semantic Drilldown from this list... |
95 | 108 | global $sdgContLang; |