From 153b27a8810084f555a85e3e05e8061aaf28cbcd Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Mon, 9 May 2016 23:08:59 +0000 Subject: [PATCH] Move importexport to new API - appsession()->getSession() --- importexport/inc/class.importexport_import_ui.inc.php | 2 +- .../inc/class.importexport_wizard_basic_import_csv.inc.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/importexport/inc/class.importexport_import_ui.inc.php b/importexport/inc/class.importexport_import_ui.inc.php index 2525c42959..ef4eeca2cb 100644 --- a/importexport/inc/class.importexport_import_ui.inc.php +++ b/importexport/inc/class.importexport_import_ui.inc.php @@ -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); diff --git a/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php b/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php index bf467dd7aa..cd7dfa37f3 100644 --- a/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php +++ b/importexport/inc/class.importexport_wizard_basic_import_csv.inc.php @@ -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']);