Author: mcantelon
Date: Wed Jan 4 16:46:11 2012
New Revision: 10564
Log:
Documented import specification options.
Modified:
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Wed Jan 4 16:43:12 2012
(r10563)
+++ trunk/lib/task/csvImportTask.class.php Wed Jan 4 16:46:11 2012
(r10564)
@@ -92,9 +92,6 @@
}
}
- // hack to make this accessible from closure
- $GLOBALS['materialTypes'] = $materialTypes;
-
// Define import
$import = new QubitFlatfileImport(array(
'columns' => fgetcsv($fh, 60000), // 1st row supplies column names/order
@@ -359,6 +356,7 @@
));
$import->setStatus('options', $options);
+ $import->setStatus('materialTypes', $materialTypes);
$import->addColumnHandler('levelOfDescription', function(&$self, $data)
{
@@ -462,9 +460,9 @@
if (isset($cvaToQubit[$data]))
{
$materialTermName = $cvaToQubit[$data];
- if (in_array($materialTermName, $GLOBALS['materialTypes']))
+ if (in_array($materialTermName, $self->getStatus('materialTypes')))
{
- $termId = array_search($materialTermName,
$GLOBALS['materialTypes']);
+ $termId = array_search($materialTermName,
$self->getStatus('materialTypes'));
// lookup material taxonomy ID from materialTypes
$self->rowStatusVars['radGeneralMaterialDesignation'] = $termId;
} else {
--
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.