From d6680b982a8ca775b295fa4fd70aeb5e415a8c1e Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 18 Apr 2018 09:42:29 +0200 Subject: [PATCH] Fix: file not physically removed --- htdocs/public/ticketsup/create_ticket.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/htdocs/public/ticketsup/create_ticket.php b/htdocs/public/ticketsup/create_ticket.php index 8c8a0dd2f60..56c81a8a530 100644 --- a/htdocs/public/ticketsup/create_ticket.php +++ b/htdocs/public/ticketsup/create_ticket.php @@ -93,9 +93,7 @@ if (GETPOST('addfile') && !GETPOST('add_ticket')) { // Remove file if (GETPOST('removedfile') && !GETPOST('add_ticket')) { - ////$res = $object->fetch('',GETPOST('track_id')); - ////if($res > 0) - ////{ + include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; // Set tmp directory @@ -103,9 +101,8 @@ if (GETPOST('removedfile') && !GETPOST('add_ticket')) { $upload_dir_tmp = $vardir . '/temp'; // TODO Delete only files that was uploaded from email form - dol_remove_file_process($_POST['removedfile'], 0); + dol_remove_file_process($_POST['removedfile'], 0, 0); $action = 'create_ticket'; - ////} } if ($action == 'create_ticket' && GETPOST('add_ticket')) { $error = 0;