Author: mcantelon
Date: Fri Jan 6 13:56:30 2012
New Revision: 10588
Log:
Added support for languages column for language-related notes.
Modified:
trunk/lib/QubitFlatfileImport.class.php
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/QubitFlatfileImport.class.php
==============================================================================
--- trunk/lib/QubitFlatfileImport.class.php Fri Jan 6 12:41:31 2012
(r10587)
+++ trunk/lib/QubitFlatfileImport.class.php Fri Jan 6 13:56:30 2012
(r10588)
@@ -383,7 +383,10 @@
{
$query = "SELECT * FROM term t LEFT JOIN term_i18n ti ON t.id=ti.id \r
WHERE t.taxonomy_id=? AND ti.name=? AND ti.culture=?";
- $statement = $this->sqlQuery($query, array($taxonomyId, $name, $culture));
+ $statement = QubitFlatfileImport::sqlQuery(
+ $query,
+ array($taxonomyId, $name, $culture)
+ );
$result = $statement->fetch(PDO::FETCH_OBJ);
if ($result)
{
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Fri Jan 6 12:41:31 2012
(r10587)
+++ trunk/lib/task/csvImportTask.class.php Fri Jan 6 13:56:30 2012
(r10588)
@@ -99,13 +99,16 @@
QubitTaxonomy::MATERIAL_TYPE_ID => 'materialTypes'
));
+ // fetch/create note term so we can add notes
+ $languageNoteTerm = QubitFlatfileImport::createOrFetchTerm(37, 'Language
note');
+
// Define import
$import = new QubitFlatfileImport(array(
/* the status array is a place to put data that should be accessible
from closure logic using the getStatus method */
'status' => array(
- 'options' => $options,
- 'materialTypes' => $termData['materialTypes']
+ 'options' => $options,
+ 'materialTypes' => $termData['materialTypes'],
),
'columnNames' => fgetcsv($fh, 60000), // 1st row supplies column
names/order
'defaultStatusId' => $defaultStatusId,
@@ -168,6 +171,9 @@
),
/* import columns that can be added as QubitNote objects */
'noteMap' => array(
+ 'languages' => array(
+ 'typeId' => $languageNoteTerm->id
+ ),
'radNoteConservation' => array(
'typeId' => array_search('Conservation note', $termData['noteTypes'])
),
--
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.