Author: david
Date: Mon Nov 21 16:21:21 2011
New Revision: 10346
Log:
Import creation dates for RAD CSV files
Modified:
trunk/lib/QubitCsvImport.class.php
Modified: trunk/lib/QubitCsvImport.class.php
==============================================================================
--- trunk/lib/QubitCsvImport.class.php Mon Nov 21 14:50:26 2011 (r10345)
+++ trunk/lib/QubitCsvImport.class.php Mon Nov 21 16:21:21 2011 (r10346)
@@ -408,6 +408,22 @@
protected function mapRad($parameters)
{
+ $creationTerm = new QubitTerm();
+ $creationTerm->id = QubitTerm::CREATION_ID;
+ $creationUrl = $this->context->routing->generate(null,
array($creationTerm, 'module' => 'term'));
+
+ // Creation dates
+ foreach (explode('|', $parameters['datesOfCreation']) as $date)
+ {
+ if (0 < strlen($date))
+ {
+ $parameters['editEvents'][] = array(
+ 'type' => $creationUrl,
+ 'date' => $date
+ );
+ }
+ }
+
if (!isset($this->materialTypes))
{
foreach (QubitTerm::getMaterialTypes() as $term)
--
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.