mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
Move importexport to new API - appsession()->getSession()
This commit is contained in:
parent
7e7f045343
commit
153b27a881
@ -471,7 +471,7 @@ use EGroupware\Api\Etemplate;
|
||||
if($dst_file)
|
||||
{
|
||||
// Still have uploaded file, jump there
|
||||
$GLOBALS['egw']->session->appsession('csvfile','',$dst_file);
|
||||
Cache::setSession($definition->application,'csvfile',$dst_file);
|
||||
$edit_link['step'] = 'wizard_step30';
|
||||
}
|
||||
$edit_link = Egw::link('/index.php',$edit_link);
|
||||
|
@ -124,15 +124,15 @@ class importexport_wizard_basic_import_csv
|
||||
{
|
||||
case 'next':
|
||||
// Process sample file for fields
|
||||
if ($GLOBALS['egw']->session->appsession('csvfile',$content['application']) &&
|
||||
($handle = fopen($GLOBALS['egw']->session->appsession('csvfile',$content['application']), "rb")) !== FALSE
|
||||
if (Api\Cache::getSession($content['application'],'csvfile') &&
|
||||
($handle = fopen(Api\Cache::getSession($content['application'],'csvfile'), "rb")) !== FALSE
|
||||
) {
|
||||
$data = fgetcsv($handle, 8000, $content['fieldsep']);
|
||||
//error_log(array2string($data));
|
||||
fclose($handle);
|
||||
|
||||
// Remove & forget file
|
||||
unlink($GLOBALS['egw']->session->appsession('csvfile',$content['application']));
|
||||
unlink(Api\Cache::getSession($content['application'],'csvfile'));
|
||||
Api\Cache::setSession($content['application'], 'csvfile', '');
|
||||
$content['csv_fields'] = Api\Translation::convert($data,$content['charset']);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user