Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2.php |
— | — | @@ -487,7 +487,7 @@ |
488 | 488 | // redirects work differently. |
489 | 489 | $table = ''; |
490 | 490 | $sql = 'p_id=' . $db->addQuotes($pid); |
491 | | - $typeid = ($value === NULL)?$property->getPropertyTypeID():$value->getTypeID(); |
| 491 | + $typeid = $property->getPropertyTypeID(); |
492 | 492 | $mode = SMWSQLStore2::getStorageMode($typeid); |
493 | 493 | |
494 | 494 | switch ($mode) { |
— | — | @@ -703,9 +703,10 @@ |
704 | 704 | |
705 | 705 | foreach($data->getProperties() as $property) { |
706 | 706 | $propertyValueArray = $data->getPropertyValues($property); |
| 707 | + $mode = SMWSQLStore2::getStorageMode($property->getPropertyTypeID()); |
707 | 708 | foreach($propertyValueArray as $value) { |
708 | 709 | if (!$value->isValid()) continue; |
709 | | - switch (SMWSQLStore2::getStorageMode($value->getTypeID())) { |
| 710 | + switch ($mode) { |
710 | 711 | case SMW_SQL2_REDI2: break; // handled above |
711 | 712 | case SMW_SQL2_INST2: |
712 | 713 | $up_inst2[] = array( |