r86261 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86260‎ | r86261 | r86262 >
Date:14:38, 17 April 2011
Author:mkroetzsch
Status:deferred
Tags:
Comment:
do not store error data items
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php
@@ -856,11 +856,14 @@
857857 $proptable = $proptables[$tableid];
858858
859859 foreach ( $data->getPropertyValues( $property ) as $di ) {
860 - // errors are already recorded separately, no need to store them here;
 860+ if ( $di instanceof SMWDIError ) { // error values, ignore
 861+ continue;
 862+ }
861863 // redirects were treated above
 864+
862865 ///TODO check needed if subject is null (would happen if a user defined proptable with !idsubject was used on an internal object -- currently this is not possible
863 - $uvals = ( $proptable->idsubject ) ? array( 's_id' => $sid ):
864 - array( 's_title' => $subject->getDBkey(), 's_namespace' => $subject->getNamespace() );
 866+ $uvals = $proptable->idsubject ? array( 's_id' => $sid ) :
 867+ array( 's_title' => $subject->getDBkey(), 's_namespace' => $subject->getNamespace() );
865868 if ( $proptable->fixedproperty == false ) {
866869 $uvals['p_id'] = $this->makeSMWPropertyID( $property );
867870 }

Status & tagging log