r24652 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r24651‎ | r24652 | r24653 >
Date:15:08, 7 August 2007
Author:mkroetzsch
Status:old
Tags:
Comment:
Bug fix in RDF export
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_NAry.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_NAry.php
@@ -371,9 +371,11 @@
372372 $count = 0;
373373 foreach ($this->m_values as $value) {
374374 $count++;
375 - $type = $value->getTypeID();
 375+ if ($value === NULL) {
 376+ continue;
 377+ }
376378 $element = "nary" . $count . $value->getTypeID();
377 - // TODO make the elemnet name dependant on the type of the value
 379+ /// TODO make the element name dependent on the type of the value
378380 $rdf .= "\t" . $value->exportToRDF( "smw:$element", $exporter );
379381 if ($value->getTypeID() == '_wpg') {
380382 $exporter->addSchemaRef( $element, "owl:ObjectProperty" );
@@ -382,7 +384,7 @@
383385 }
384386 }
385387 $rdf .= "\t\t</$QName>\n";
386 - return $rdf;
 388+ return $rdf;
387389 }
388390
389391 }

Status & tagging log