Skip to content

Commit

Permalink
Fix #10599 - Update Import Error
Browse files Browse the repository at this point in the history
  • Loading branch information
jack7anderson7 committed Dec 17, 2024
1 parent c69e5ee commit 15a7187
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions modules/Import/sources/ImportDataSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ abstract public function getTotalRecordCount();
* @return void
*/
abstract public function getHeaderColumns();

/**
* Set the source name.
*
Expand Down Expand Up @@ -197,7 +197,7 @@ public static function writeRowToLastImport($import_module, $module, $id)
if ($module == 'Case') {
$module = 'aCase';
}

$last_import->bean_type = $module;
$last_import->bean_id = $id;
return $last_import->save();
Expand Down Expand Up @@ -228,9 +228,9 @@ protected function formatErrorMessage($error, $fieldName, $fieldValue)
{
global $current_language;
$mod_strings = return_module_language($current_language, 'Import');
return "<b>{$mod_strings['LBL_ERROR']}</b> $error <br/>".
"<b>{$mod_strings['LBL_FIELD_NAME']}</b> $fieldName <br/>" .
"<b>{$mod_strings['LBL_VALUE']}</b> $fieldValue <br/>";
return "{$mod_strings['LBL_ERROR']}: $error. ".
"- {$mod_strings['LBL_FIELD_NAME']}: $fieldName. " .
"- {$mod_strings['LBL_VALUE']}: $fieldValue";
}
public function resetRowErrorCounter()
{
Expand Down Expand Up @@ -330,7 +330,7 @@ public function writeErrorRecord($errorMessage = '')
//Add the error message to the first column
array_unshift($rowData, $errorMessage);
fputcsv($fp, $rowData);

fclose($fp);
fclose($fpNoErrors);
}
Expand Down

0 comments on commit 15a7187

Please sign in to comment.