mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-13 17:38:19 +01:00
fix for 2 people importing an equally named file at the same time, thanks to Matthew Galgoci <mgalgoci -at- redhat.com>
This commit is contained in:
parent
6881070b41
commit
d0b2a3a823
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
if (isset($_FILES['csvfile']['tmp_name']))
|
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);
|
$GLOBALS['phpgw']->session->appsession('csvfile','',$csvfile);
|
||||||
$_POST['action'] = move_uploaded_file($_FILES['csvfile']['tmp_name'],$csvfile) ?
|
$_POST['action'] = move_uploaded_file($_FILES['csvfile']['tmp_name'],$csvfile) ?
|
||||||
'download' : '';
|
'download' : '';
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
}
|
}
|
||||||
if (isset($_FILES['csvfile']['tmp_name']))
|
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);
|
$GLOBALS['phpgw']->session->appsession('csvfile','',$csvfile);
|
||||||
$_POST['action'] = move_uploaded_file($_FILES['csvfile']['tmp_name'],$csvfile) ?
|
$_POST['action'] = move_uploaded_file($_FILES['csvfile']['tmp_name'],$csvfile) ?
|
||||||
'download' : '';
|
'download' : '';
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
}
|
}
|
||||||
if (isset($_FILES['csvfile']['tmp_name']))
|
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);
|
$GLOBALS['phpgw']->session->appsession('csvfile','',$csvfile);
|
||||||
$_POST['action'] = move_uploaded_file($_FILES['csvfile']['tmp_name'],$csvfile) ?
|
$_POST['action'] = move_uploaded_file($_FILES['csvfile']['tmp_name'],$csvfile) ?
|
||||||
'download' : '';
|
'download' : '';
|
||||||
|
Loading…
Reference in New Issue
Block a user