Author: mcantelon
Date: Fri Aug 31 17:20:01 2012
New Revision: 12241
Log:
Changed term ID lookup helper method to be more generally useful.
Modified:
trunk/lib/QubitFlatfileImport.class.php
Modified: trunk/lib/QubitFlatfileImport.class.php
==============================================================================
--- trunk/lib/QubitFlatfileImport.class.php Fri Aug 31 17:06:12 2012
(r12240)
+++ trunk/lib/QubitFlatfileImport.class.php Fri Aug 31 17:20:01 2012
(r12241)
@@ -1454,9 +1454,12 @@
*/
public function translateNameToTermId($description, $value,
$valueToTermNameMap, $terms)
{
- if (isset($valueToTermNameMap[$value]))
+ if (isset($valueToTermNameMap[$value]) || count($valueToTermNameMap) == 0)
{
- $termName = $valueToTermNameMap[$value];
+ $termName = (count($valueToTermNameMap))
+ ? $valueToTermNameMap[$value]
+ : $value;
+
if (in_array($termName, $terms))
{
$termId = array_search($termName, $terms);
--
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.