r86268 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86267‎ | r86268 | r86269 >
Date:17:35, 17 April 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
explicitly export information about redirects of pages (instead of just exporting an OWL/RDF property that encodes semantic equivalence of such pages)
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/export/SMW_Exporter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/export/SMW_Exporter.php
@@ -159,6 +159,9 @@
160160 } else {
161161 $pe = SMWExporter::getSpecialNsResource( 'owl', 'sameAs' );
162162 }
 163+ if ( $property->getKey() == '_REDI' ) {
 164+ $pe = array( $pe, SMWExporter::getSpecialNsResource( 'swivt', 'redirectsTo' ) );
 165+ }
163166 break;
164167 case '_SUBP':
165168 if ( $diSubject->getNamespace() == SMW_NS_PROPERTY ) {
@@ -198,6 +201,10 @@
199202 }
200203 }
201204 }
 205+ } elseif ( is_array( $pe ) ) {
 206+ foreach ( $pe as $extraPropertyElement ) {
 207+ $expData->addPropertyObjectValue( $extraPropertyElement, $ed );
 208+ }
202209 } else {
203210 $expData->addPropertyObjectValue( $pe, $ed );
204211 }

Status & tagging log