Author: mcantelon
Date: Thu Dec 29 13:57:10 2011
New Revision: 10470

Log:
Fixed import logic so creation of child data happens after creation of parent.

Modified:
   trunk/lib/task/csvImportTask.class.php

Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php      Thu Dec 29 13:51:49 2011        
(r10469)
+++ trunk/lib/task/csvImportTask.class.php      Thu Dec 29 13:57:10 2011        
(r10470)
@@ -265,11 +265,28 @@
     }
   }
 
+  protected function forEachRowColumn($row, $logic)
+  {
+    for ($index = 0; $index < sizeof($row); $index++)
+    {
+
+      // determine what type of data should be in this column
+      $columnName = $this->columns[$index];
+
+      $logic($index, $columnName);
+    }
+  }
+
   public function row($row = array())
   {
     // execute row initialization logic
     $this->executeClosurePropertyIfSet('rowInit');
 
+    $this->forEachRowColumn($row, function($index, $columnName) {
+print 'C:'. $columnName;
+    });
+exit();
+    /*
     // process import columns, except those that produce child data
     for ($index = 0; $index < sizeof($row); $index++)
     {
@@ -294,6 +311,7 @@
         );
       }
     }
+    */
 
     // execute row completion logic
     $this->executeClosurePropertyIfSet('rowComplete');

-- 
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.

Reply via email to