Author: mcantelon
Date: Mon Jan 2 13:51:27 2012
New Revision: 10514
Log:
Added support for more note types and the radNoteSourceOfTitleProper column.
Modified:
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Mon Jan 2 13:21:33 2012
(r10513)
+++ trunk/lib/task/csvImportTask.class.php Mon Jan 2 13:51:27 2012
(r10514)
@@ -67,9 +67,16 @@
);
$defaultStatusTypeId = QubitTerm::STATUS_TYPE_PUBLICATION_ID;
- // Get note type ID => name mapping
- foreach(QubitFlatfileImport::getTaxomoyTerms(37) as $termId => $term) {
- $noteTypes[$termId] = $term->name;
+ // Get note type ID => name mapping for note types
+ $noteTaxonomies = array(
+ 37 => 'noteTypes',
+ 52 => 'titleNoteTypes'
+ );
+ foreach($noteTaxonomies as $taxonomyId => $varName) {
+ $$varName = array();
+ foreach(QubitFlatfileImport::getTaxomoyTerms($taxonomyId) as $termId =>
$term) {
+ ${$varName}[$termId] = $term->name;
+ }
}
// Define import
@@ -133,6 +140,7 @@
'noteMap' => array(
'radNoteConservation' => array('typeId' => array_search('Conservation
note', $noteTypes)),
'radNoteGeneral' => array('typeId' => array_search('General note',
$noteTypes)),
+ 'radNoteSourceOfTitleProper' => array('typeId' => array_search('Source
of title proper', $titleNodeTypes)),
'radNoteAlphaNumericDesignation' => array(
'typeId' => 247,
'transformationLogic' => function(&$self, $text)
--
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.