- Explicitly add CP850 to list of import encodings

- Other encodings (not supported by eGW) can be added in site configuration
This commit is contained in:
Nathan Gray 2011-12-05 17:27:04 +00:00
parent 95a3e33aea
commit d366cf8b71
4 changed files with 20 additions and 5 deletions

View File

@ -956,6 +956,8 @@ class importexport_definitions_ui
$data = config::read(self::_appname);
$data['share_definition'] = $GLOBALS['egw']->acl->get_ids_for_location('share_definition', EGW_ACL_READ, self::_appname);
$sel_options['import_charsets'] = array_combine(mb_list_encodings(),mb_list_encodings());
unset($sel_options['import_charsets']['CP850']); // This one explicitly added in wizard
if(!$data['update']) $data['update'] = 'request';

View File

@ -218,8 +218,17 @@ class importexport_wizard_basic_import_csv
$sel_options['charset'] = $GLOBALS['egw']->translation->get_installed_charsets()+
array(
'utf-8' => 'utf-8 (Unicode)',
'user' => lang('User preference')
) + array(lang('All encodings') => array_combine(mb_list_encodings(),mb_list_encodings()));
'CP850' => 'CP850',
'user' => lang('User preference'),
);
// Add in extra allowed charsets
$config = config::read('importexport');
$extra_charsets = array_intersect(explode(',',$config['import_charsets']), mb_list_encodings());
if($extra_charsets)
{
$sel_options['charset'] += array(lang('Extra encodings') => array_combine($extra_charsets,$extra_charsets));
}
$sel_options['convert'] = array(
0 => lang('Database values'),
1 => lang('Human friendly values')

File diff suppressed because one or more lines are too long

View File

@ -16,6 +16,10 @@
<description value="Users allowed to share their own definitions"/>
<listbox type="select-account" id="share_definition" rows="5" options="both"/>
</row>
<row valign="top">
<description value="Extra charsets for import"/>
<listbox id="import_charsets" rows="5"/>
</row>
<row>
<hbox span="all">
<button label="Save" id="save" span="all"/>