Author: mcantelon
Date: Tue Apr 3 16:54:05 2012
New Revision: 11359
Log:
Minor refactoring of create event import logic.
Modified:
trunk/lib/task/import/csvImportTask.class.php
Modified: trunk/lib/task/import/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/import/csvImportTask.class.php Tue Apr 3 16:47:38
2012 (r11358)
+++ trunk/lib/task/import/csvImportTask.class.php Tue Apr 3 16:54:05
2012 (r11359)
@@ -622,6 +622,7 @@
}
// add creators and create events
+ $createEvents = array();
if (isset($self->rowStatusVars['creators'])
&& count($self->rowStatusVars['creators']))
{
@@ -638,11 +639,7 @@
$eventData['actorHistory'] =
$self->rowStatusVars['creatorHistories'][$index];
}
- // Create event
- $event = $self->createEvent(
- QubitTerm::CREATION_ID,
- $eventData
- );
+ array_push($createEvents, $eventData);
}
}
else if(
@@ -655,7 +652,15 @@
setupEventDateData($self, $eventData, $index);
- // Create event
+ array_push($createEvents, $eventData);
+ }
+ }
+
+ // create events, if any
+ if (count($createEvents))
+ {
+ foreach($createEvents as $eventData)
+ {
$event = $self->createEvent(
QubitTerm::CREATION_ID,
$eventData
--
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.