Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php |
— | — | @@ -9,7 +9,7 @@ |
10 | 10 | |
11 | 11 | if ( !defined( 'MEDIAWIKI' ) ) die(); |
12 | 12 | |
13 | | -define( 'SIO_VERSION', '0.6.3' ); |
| 13 | +define( 'SIO_VERSION', '0.6.4 alpha' ); |
14 | 14 | |
15 | 15 | $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'parserhook'][] = array( |
16 | 16 | 'path' => __FILE__, |
Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php |
— | — | @@ -185,13 +185,19 @@ |
186 | 186 | $valueNum = $value->getNumericValue(); |
187 | 187 | } |
188 | 188 | |
189 | | - $upAtts2[] = array( |
| 189 | + $upAttr = array( |
190 | 190 | 's_id' => $ioID, |
191 | 191 | 'p_id' => $this->makeSMWPropertyID( $property ), |
192 | | - 'value_unit' => $value->getUnit(), |
193 | 192 | 'value_xsd' => $keys[0], |
194 | 193 | 'value_num' => $valueNum |
195 | 194 | ); |
| 195 | + |
| 196 | + // getUnit got removed in SMW 1.6 |
| 197 | + if ( method_exists( $value, 'getUnit' ) ) { |
| 198 | + $upAttr['value_unit'] = $value->getUnit(); |
| 199 | + } |
| 200 | + |
| 201 | + $upAtts2[] = $upAttr; |
196 | 202 | } elseif ( $isText ) { |
197 | 203 | $keys = $value->getDBkeys(); |
198 | 204 | $upText2[] = array( |