Skip to content

Commit

Permalink
Merge pull request #746 from Sophist-UK/sophist_fix_importcsv
Browse files Browse the repository at this point in the history
Fix import from CSV
  • Loading branch information
pollen8 committed Jun 20, 2013
2 parents ba2f1c6 + cd95a2e commit 7a3c4df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions components/com_fabrik/models/form.php
Original file line number Diff line number Diff line change
Expand Up @@ -1655,6 +1655,8 @@ protected function submitToDatabase($rowId = '0')
{
$listModel->encrypt[] = $elementModel->getElement()->name;
}
// Following line added to fix importcsv where data from first row is used for every row.
$elementModel->defaults = null;
$elementModel->onStoreRow($data);
}
}
Expand Down
2 changes: 1 addition & 1 deletion components/com_fabrik/models/importcsv.php
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ public function insertData()
}
if (!$tableJoinsFound)
{
$formModel->formData = $aRow;
$formModel->formData = $formModel->formDataWithTableName = $aRow;
if (!in_array(false, FabrikWorker::getPluginManager()->runPlugins('onImportCSVRow', $model, 'list')))
{
$formModel->processToDB();
Expand Down

0 comments on commit 7a3c4df

Please sign in to comment.