Author: mcantelon
Date: Fri Dec 30 13:50:07 2011
New Revision: 10489
Log:
Roughed in accessing adding, but getting error so commented it out.
Modified:
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Fri Dec 30 11:45:52 2011
(r10488)
+++ trunk/lib/task/csvImportTask.class.php Fri Dec 30 13:50:07 2011
(r10489)
@@ -153,6 +153,22 @@
$self->informationObject->save();
}
+ // add accessions
+ if (
+ isset($self->rowStatusVars['accessionNumbers'])
+ && sizeof($self->rowStatusVars['accessionNumbers'])
+ )
+ {
+ foreach($self->rowStatusVars['accessionNumbers'] as $accessionNumber)
+ {
+ /* currently errors out
+ $accession = new QubitDeaccessionI18n;
+ $accession->identifier = $accessionNumber;
+ $accession->save();
+ */
+ }
+ }
+
// add create event if specified
if (
isset($self->rowStatusVars['startYear'])
@@ -182,6 +198,13 @@
$self->informationObject->setLevelOfDescriptionByName($data);
});
+ $import->addColumnHandler('accessionNumber', function(&$self, $data)
+ {
+ if ($data) {
+ $self->rowStatusVars['accessionNumbers'] = explode('|', $data);
+ }
+ });
+
$import->addColumnHandler('creatorHistory', function(&$self, $data)
{
$self->rowStatusVars['creatorHistory'] = $data;
--
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.