diff --git a/addressbook/csv_import.php b/addressbook/csv_import.php index 9de0bd0829..7791792c12 100644 --- a/addressbook/csv_import.php +++ b/addressbook/csv_import.php @@ -21,7 +21,7 @@ if (isset($_FILES['csvfile']['tmp_name'])) { - $csvfile = $GLOBALS['phpgw_info']['server']['temp_dir'].'/addrbook_import_'.basename($csvfile); + $csvfile = tempnam($GLOBALS['phpgw_info']['server']['temp_dir'],$GLOBALS['phpgw_info']['flags']['currentapp']."_"); $GLOBALS['phpgw']->session->appsession('csvfile','',$csvfile); $_POST['action'] = move_uploaded_file($_FILES['csvfile']['tmp_name'],$csvfile) ? 'download' : ''; diff --git a/calendar/csv_import.php b/calendar/csv_import.php index 4a5ae91619..911876294b 100644 --- a/calendar/csv_import.php +++ b/calendar/csv_import.php @@ -25,7 +25,7 @@ } if (isset($_FILES['csvfile']['tmp_name'])) { - $csvfile = $GLOBALS['phpgw_info']['server']['temp_dir'].'/calendar_import_'.basename($csvfile); + $csvfile = tempnam($GLOBALS['phpgw_info']['server']['temp_dir'],$GLOBALS['phpgw_info']['flags']['currentapp']."_"); $GLOBALS['phpgw']->session->appsession('csvfile','',$csvfile); $_POST['action'] = move_uploaded_file($_FILES['csvfile']['tmp_name'],$csvfile) ? 'download' : ''; diff --git a/infolog/csv_import.php b/infolog/csv_import.php index 494c2e51c0..b792574794 100644 --- a/infolog/csv_import.php +++ b/infolog/csv_import.php @@ -26,7 +26,7 @@ } if (isset($_FILES['csvfile']['tmp_name'])) { - $csvfile = $GLOBALS['phpgw_info']['server']['temp_dir'].'/infolog_import_'.basename($csvfile); + $csvfile = tempnam($GLOBALS['phpgw_info']['server']['temp_dir'],$GLOBALS['phpgw_info']['flags']['currentapp']."_"); $GLOBALS['phpgw']->session->appsession('csvfile','',$csvfile); $_POST['action'] = move_uploaded_file($_FILES['csvfile']['tmp_name'],$csvfile) ? 'download' : '';