r85127 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85126‎ | r85127 | r85128 >
Date:15:39, 1 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fixing compat with SMW 1.6
Modified paths:
  • /trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php (modified) (history)
  • /trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects.php
@@ -9,7 +9,7 @@
1010
1111 if ( !defined( 'MEDIAWIKI' ) ) die();
1212
13 -define( 'SIO_VERSION', '0.6.3' );
 13+define( 'SIO_VERSION', '0.6.4 alpha' );
1414
1515 $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'parserhook'][] = array(
1616 'path' => __FILE__,
Index: trunk/extensions/SemanticInternalObjects/SemanticInternalObjects_body.php
@@ -185,13 +185,19 @@
186186 $valueNum = $value->getNumericValue();
187187 }
188188
189 - $upAtts2[] = array(
 189+ $upAttr = array(
190190 's_id' => $ioID,
191191 'p_id' => $this->makeSMWPropertyID( $property ),
192 - 'value_unit' => $value->getUnit(),
193192 'value_xsd' => $keys[0],
194193 'value_num' => $valueNum
195194 );
 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;
196202 } elseif ( $isText ) {
197203 $keys = $value->getDBkeys();
198204 $upText2[] = array(

Follow-up revisions

RevisionCommit summaryAuthorDate
r93594Fix to r85127 - better check for SMW 1.6yaron16:38, 31 July 2011

Status & tagging log