mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-24 15:48:55 +01:00
calling translation class static and remove (unnecessary) extra utf-8 charset
This commit is contained in:
parent
fc141457cf
commit
7209eac430
@ -119,9 +119,7 @@ switch($_POST['action'])
|
||||
$GLOBALS['egw']->template->set_var('lang_fieldsep',lang('Fieldseparator'));
|
||||
$GLOBALS['egw']->template->set_var('lang_charset',lang('Charset of file'));
|
||||
$GLOBALS['egw']->template->set_var('select_charset',
|
||||
html::select('charset','',
|
||||
$GLOBALS['egw']->translation->get_installed_charsets()+
|
||||
array('utf-8' => 'utf-8 (Unicode)'),True));
|
||||
html::select('charset','',translation::get_installed_charsets(),True));
|
||||
$GLOBALS['egw']->template->set_var('fieldsep',$_POST['fieldsep'] ? $_POST['fieldsep'] : ';');
|
||||
$GLOBALS['egw']->template->set_var('submit',lang('Import'));
|
||||
$GLOBALS['egw']->template->set_var('csvfile',$csvfile);
|
||||
@ -163,7 +161,7 @@ switch($_POST['action'])
|
||||
$addr_name_options .= "<option value=\"$field\">".$GLOBALS['egw']->strip_html($name)."\n";
|
||||
}
|
||||
$csv_fields = fgetcsv($fp,8000,$_POST['fieldsep']);
|
||||
$csv_fields = $GLOBALS['egw']->translation->convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields = translation::convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields[] = 'no CSV 1'; // eg. for static assignments
|
||||
$csv_fields[] = 'no CSV 2';
|
||||
$csv_fields[] = 'no CSV 3';
|
||||
@ -251,7 +249,7 @@ switch($_POST['action'])
|
||||
ini_set('auto_detect_line_endings',true); // to allow to import files created eg. on a mac
|
||||
$fp=fopen($csvfile,'r');
|
||||
$csv_fields = fgetcsv($fp,8000,$_POST['fieldsep']);
|
||||
$csv_fields = $GLOBALS['egw']->translation->convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields = translation::convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields[] = 'no CSV 1'; // eg. for static assignments
|
||||
$csv_fields[] = 'no CSV 2';
|
||||
$csv_fields[] = 'no CSV 3';
|
||||
@ -316,7 +314,7 @@ switch($_POST['action'])
|
||||
{
|
||||
break; // EOF
|
||||
}
|
||||
$fields = $GLOBALS['egw']->translation->convert($fields,$_POST['charset']);
|
||||
$fields = translation::convert($fields,$_POST['charset']);
|
||||
|
||||
$log .= "\t</tr><tr><td>".($start+$anz)."</td>\n";
|
||||
|
||||
|
@ -10,9 +10,11 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
$GLOBALS['egw_info']['flags'] = array(
|
||||
'currentapp' => 'calendar',
|
||||
'noheader' => True
|
||||
$GLOBALS['egw_info'] = array(
|
||||
'flags' => array(
|
||||
'currentapp' => 'calendar',
|
||||
'noheader' => True
|
||||
),
|
||||
);
|
||||
include('../header.inc.php');
|
||||
|
||||
@ -137,9 +139,7 @@ case '': // Start, ask Filename
|
||||
$GLOBALS['egw']->template->set_var('lang_charset',lang('Charset of file'));
|
||||
$GLOBALS['egw']->template->set_var('lang_help',lang('Please note: You can configure the field assignments AFTER you uploaded the file.'));
|
||||
$GLOBALS['egw']->template->set_var('select_charset',
|
||||
html::select('charset','',
|
||||
$GLOBALS['egw']->translation->get_installed_charsets()+
|
||||
array('utf-8' => 'utf-8 (Unicode)'),True));
|
||||
html::select('charset','',translation::get_installed_charsets(),True));
|
||||
$GLOBALS['egw']->template->set_var('fieldsep',$_POST['fieldsep'] ? $_POST['fieldsep'] : ';');
|
||||
$GLOBALS['egw']->template->set_var('submit',lang('Import'));
|
||||
$GLOBALS['egw']->template->set_var('enctype','ENCTYPE="multipart/form-data"');
|
||||
@ -201,7 +201,7 @@ case 'download':
|
||||
$cal_name_options .= "<option value=\"$field\">".$GLOBALS['egw']->strip_html($name)."\n";
|
||||
}
|
||||
$csv_fields = fgetcsv($fp,8000,$_POST['fieldsep']);
|
||||
$csv_fields = $GLOBALS['egw']->translation->convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields = translation::convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields[] = 'no CSV 1'; // eg. for static assignments
|
||||
$csv_fields[] = 'no CSV 2';
|
||||
$csv_fields[] = 'no CSV 3';
|
||||
@ -290,7 +290,7 @@ case 'import':
|
||||
@set_time_limit(0);
|
||||
$fp=fopen($csvfile,'r');
|
||||
$csv_fields = fgetcsv($fp,8000,$_POST['fieldsep']);
|
||||
$csv_fields = $GLOBALS['egw']->translation->convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields = translation::convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields[] = 'no CSV 1'; // eg. for static assignments
|
||||
$csv_fields[] = 'no CSV 2';
|
||||
$csv_fields[] = 'no CSV 3';
|
||||
@ -359,7 +359,7 @@ case 'import':
|
||||
{
|
||||
break; // EOF
|
||||
}
|
||||
$fields = $GLOBALS['egw']->translation->convert($fields,$_POST['charset']);
|
||||
$fields = translation::convert($fields,$_POST['charset']);
|
||||
|
||||
$log .= "\t<tr>\n\t\t<td>".($start+$anz)."</td>\n";
|
||||
|
||||
|
@ -10,10 +10,12 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
$GLOBALS['egw_info']['flags'] = array(
|
||||
'currentapp' => 'infolog',
|
||||
'noheader' => True,
|
||||
'enable_contacts_class' => True,
|
||||
$GLOBALS['egw_info'] = array(
|
||||
'flags' => array(
|
||||
'currentapp' => 'infolog',
|
||||
'noheader' => True,
|
||||
'enable_contacts_class' => True,
|
||||
),
|
||||
);
|
||||
include('../header.inc.php');
|
||||
|
||||
@ -171,9 +173,7 @@ case '': // Start, ask Filename
|
||||
$GLOBALS['egw']->template->set_var('lang_fieldsep',lang('Fieldseparator'));
|
||||
$GLOBALS['egw']->template->set_var('lang_charset',lang('Charset of file'));
|
||||
$GLOBALS['egw']->template->set_var('select_charset',
|
||||
html::select('charset','',
|
||||
$GLOBALS['egw']->translation->get_installed_charsets()+
|
||||
array('utf-8' => 'utf-8 (Unicode)'),True));
|
||||
html::select('charset','',translation::get_installed_charsets(),True));
|
||||
$GLOBALS['egw']->template->set_var('fieldsep',$_POST['fieldsep'] ? $_POST['fieldsep'] : ';');
|
||||
$GLOBALS['egw']->template->set_var('submit',lang('Import'));
|
||||
$GLOBALS['egw']->template->set_var('enctype','ENCTYPE="multipart/form-data"');
|
||||
@ -259,7 +259,7 @@ case 'download':
|
||||
$info_name_options .= "<option value=\"$field\">".$GLOBALS['egw']->strip_html($name)."\n";
|
||||
}
|
||||
$csv_fields = fgetcsv($fp,8000,$_POST['fieldsep']);
|
||||
$csv_fields = $GLOBALS['egw']->translation->convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields = translation::convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields[] = 'no CSV 1'; // eg. for static assignments
|
||||
$csv_fields[] = 'no CSV 2';
|
||||
$csv_fields[] = 'no CSV 3';
|
||||
@ -349,7 +349,7 @@ case 'import':
|
||||
@set_time_limit(0);
|
||||
$fp=fopen($csvfile,'r');
|
||||
$csv_fields = fgetcsv($fp,8000,$_POST['fieldsep']);
|
||||
$csv_fields = $GLOBALS['egw']->translation->convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields = translation::convert($csv_fields,$_POST['charset']);
|
||||
$csv_fields[] = 'no CSV 1'; // eg. for static assignments
|
||||
$csv_fields[] = 'no CSV 2';
|
||||
$csv_fields[] = 'no CSV 3';
|
||||
@ -413,7 +413,7 @@ case 'import':
|
||||
{
|
||||
break; // EOF
|
||||
}
|
||||
$fields = $GLOBALS['egw']->translation->convert($fields,$_POST['charset']);
|
||||
$fields = translation::convert($fields,$_POST['charset']);
|
||||
|
||||
$log .= "\t</tr><tr><td>".($start+$anz)."</td>\n";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user