- Remove standard encodings from extra charset list

- Add extra charsets to export too
This commit is contained in:
Nathan Gray 2011-12-07 00:12:18 +00:00
parent 5b5a6bb625
commit ada529a9d5
5 changed files with 23 additions and 4 deletions

View File

@ -960,6 +960,12 @@ 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());
// Remove 'standard' encodings to prevent doubles
foreach($GLOBALS['egw']->translation->get_installed_charsets() as $charset => $label)
{
unset($sel_options['import_charsets'][strtoupper($charset)]);
}
unset($sel_options['import_charsets']['CP850']); // This one explicitly added in wizard
if(!$data['update']) $data['update'] = 'request';

View File

@ -189,7 +189,19 @@ class importexport_wizard_basic_export_csv
'label' => lang('Field labels')
);
$sel_options['charset'] = $GLOBALS['egw']->translation->get_installed_charsets()+
array('utf-8' => 'utf-8 (Unicode)', 'user' => lang('User preference'));
array(
'utf-8' => 'utf-8 (Unicode)',
'CP850' => 'CP850 (Old DOS systems)',
'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')

View File

@ -41,6 +41,7 @@ export data as importexport en Export data as
export definition to use for nextmatch export preferences en Export definition to use for nextmatch export
export spreadsheet importexport en Export Spreadsheet
exported importexport en Exported.
extra charsets for import / export importexport en Extra charsets for import / export
false importexport en False
field labels importexport en Field labels
field names importexport en Field names

File diff suppressed because one or more lines are too long

View File

@ -17,7 +17,7 @@
<listbox type="select-account" id="share_definition" rows="5" options="both"/>
</row>
<row valign="top">
<description value="Extra charsets for import"/>
<description value="Extra charsets for import / export"/>
<listbox id="import_charsets" rows="5"/>
</row>
<row>