Don't clear cat_id if it wasn't found, let app have the original

This commit is contained in:
Nathan Gray 2011-04-04 17:28:35 +00:00
parent 8276cbbade
commit 15bac6b211

View File

@ -316,7 +316,9 @@ class importexport_import_csv implements importexport_iface_import_record { //,
foreach((array)$fields['select-cat'] as $name) {
if($record[$name]) {
$record[$name] = importexport_helper_functions::cat_name2id($record[$field]);
$cat_id = importexport_helper_functions::cat_name2id($record[$name]);
// Don't clear it if it wasn't found
if($cat_id) $record[$name] = $cat_id;
}
}
}