Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php |
— | — | @@ -18,7 +18,13 @@ |
19 | 19 | } |
20 | 20 | |
21 | 21 | public function addPropertyAndValue( $propName, $value ) { |
22 | | - $property = SMWPropertyValue::makeUserProperty( $propName ); |
| 22 | + // SMW 1.6+ |
| 23 | + if ( class_exists( 'SMWDIProperty' ) ) { |
| 24 | + $property = new SMWDIProperty( $propName ); |
| 25 | + } else { |
| 26 | + $property = SMWPropertyValue::makeUserProperty( $propName ); |
| 27 | + } |
| 28 | + |
23 | 29 | $dataValue = SMWDataValueFactory::newPropertyObjectValue( $property, $value ); |
24 | 30 | if ( $dataValue->isValid() ) { |
25 | 31 | $this->mPropertyValuePairs[] = array( $property, $dataValue ); |