FIX #13194
This commit is contained in:
parent
5ff4b638a5
commit
adc996ee0a
@ -68,11 +68,12 @@ if (GETPOST('addfile', 'alpha') && !GETPOST('add', 'alpha')) {
|
||||
|
||||
// Set tmp directory TODO Use a dedicated directory for temp mails files
|
||||
$vardir = $conf->ticket->dir_output;
|
||||
$upload_dir_tmp = $vardir.'/temp';
|
||||
$upload_dir_tmp = $vardir.'/temp/'.session_id();
|
||||
if (!dol_is_dir($upload_dir_tmp)) {
|
||||
dol_mkdir($upload_dir_tmp);
|
||||
}
|
||||
dol_add_file_process($upload_dir_tmp, 0, 0, 'addedfile');
|
||||
|
||||
dol_add_file_process($upload_dir_tmp, 0, 0, 'addedfile', '', null, '', 0);
|
||||
$action = 'create_ticket';
|
||||
////}
|
||||
}
|
||||
@ -83,7 +84,7 @@ if (GETPOST('removedfile', 'alpha') && !GETPOST('add', 'alpha')) {
|
||||
|
||||
// Set tmp directory
|
||||
$vardir = $conf->ticket->dir_output.'/';
|
||||
$upload_dir_tmp = $vardir.'/temp';
|
||||
$upload_dir_tmp = $vardir.'/temp/'.session_id();
|
||||
|
||||
// TODO Delete only files that was uploaded from email form
|
||||
dol_remove_file_process($_POST['removedfile'], 0, 0);
|
||||
@ -170,7 +171,7 @@ if ($action == 'create_ticket' && GETPOST('add', 'alpha')) {
|
||||
|
||||
if (!$error && $id > 0) {
|
||||
if ($usertoassign > 0) {
|
||||
$object->add_contact($usertoassign, "SUPPORTCLI", 'external', $notrigger = 0);
|
||||
$object->add_contact($usertoassign, "SUPPORTCLI", 'external', 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -304,7 +305,7 @@ if ($action == 'create_ticket' && GETPOST('add', 'alpha')) {
|
||||
}
|
||||
|
||||
// Copy files into ticket directory
|
||||
$destdir = $conf->ticket->dir_output.'/'.$object->track_id;
|
||||
$destdir = $conf->ticket->dir_output.'/'.$object->ref;
|
||||
if (!dol_is_dir($destdir)) {
|
||||
dol_mkdir($destdir);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user