Author: mcantelon
Date: Tue Feb 14 15:46:21 2012
New Revision: 10887
Log:
Fixed bug with QubitFlatFile that caused properties not to be saved.
Modified:
trunk/lib/QubitFlatfileImport.class.php
Modified: trunk/lib/QubitFlatfileImport.class.php
==============================================================================
--- trunk/lib/QubitFlatfileImport.class.php Tue Feb 14 15:31:37 2012
(r10886)
+++ trunk/lib/QubitFlatfileImport.class.php Tue Feb 14 15:46:21 2012
(r10887)
@@ -486,6 +486,18 @@
{
$self->mappedColumnHandler($self->columnMap[$columnName], $value);
}
+ // if column maps to a property, set the property
+ else if (
+ isset($self->propertyMap)
+ && isset($self->propertyMap[$columnName])
+ && trim($value)
+ )
+ {
+ $self->object->addProperty(
+ $self->propertyMap[$columnName],
+ $value
+ );
+ }
else if (
isset($self->columnNames[$index])
&& isset($self->handlers[($self->columnNames[$index])])
@@ -520,15 +532,7 @@
{
$this->forEachRowColumn($row, function(&$self, $index, $columnName, $value)
{
- // if column maps to a property, set the property
- if (isset($self->propertyMap) && isset($self->propertyMap[$columnName])
&& trim($value))
- {
- $self->object->addProperty(
- $self->propertyMap[$columnName],
- $value
- );
- }
- else if (isset($self->noteMap) && isset($self->noteMap[$columnName]) &&
trim($value))
+ if (isset($self->noteMap) && isset($self->noteMap[$columnName]) &&
trim($value))
{
// otherwise, if maps to a note, create it
$transformationLogic =
(isset($self->noteMap[$columnName]['transformationLogic']))
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.