forked from extern/egroupware
Fix missed usage of user charset preference in CSV check
This commit is contained in:
parent
2a001498a1
commit
a004c7f4ea
@ -341,9 +341,12 @@
|
||||
// Only CSV files
|
||||
if(!$options['csv_fields']) return true;
|
||||
|
||||
$preference = $GLOBALS['egw_info']['user']['preferences']['common']['csv_charset'];
|
||||
$charset = $options['charset'] == 'user' || !$options['charset'] ? $preference : $options['charset'];
|
||||
|
||||
$data = fgetcsv($file, 8000, $options['fieldsep']);
|
||||
rewind($file);
|
||||
$data = translation::convert($data,$options['charset']);
|
||||
$data = translation::convert($data,$charset);
|
||||
|
||||
$ok = true;
|
||||
if(count($data) != count($options['csv_fields']) && max(array_keys($data)) != max(array_keys($options['csv_fields'])))
|
||||
@ -393,6 +396,7 @@
|
||||
{
|
||||
continue;
|
||||
}
|
||||
//error_log("Raw[Defn: {$options['csv_fields'][$index]} File: $header] Lang[Defn: $lang_defn File: $lang_file] MSG_ID[Defn: $defn_message_id File: $file_message_id]");
|
||||
|
||||
// Problem
|
||||
$message[] = lang("Column mismatch: %1 should be %2, not %3",
|
||||
|
Loading…
Reference in New Issue
Block a user