diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index e2db0e800fd..7d1777a8a38 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -66,8 +66,8 @@ if (isset($_POST["action"]) && $_POST["action"] == 'update') if ($_POST['addfile'] || $_POST['addfilehtml']) { // Set tmp user directory - $conf->users->dir_tmp=DOL_DATA_ROOT."/users/".$user->id; - $upload_dir = $conf->users->dir_tmp.'/temp/'; + $vardir=$conf->users->dir_output."/".$user->id; + $upload_dir = $vardir.'/temp/'; if (! empty($_FILES['addedfile']['tmp_name'])) { diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 296ffeb84b8..0454e59ff0c 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -364,8 +364,8 @@ if ($_REQUEST['action'] == 'setstatut' && $user->rights->propale->cloturer) if ($_POST['addfile']) { // Set tmp user directory - $conf->users->dir_tmp=DOL_DATA_ROOT."/users/".$user->id; - $upload_dir = $conf->users->dir_tmp.'/temp/'; + $vardir=$conf->users->dir_output."/".$user->id; + $upload_dir = $vardir.'/temp/'; if (! empty($_FILES['addedfile']['tmp_name'])) { diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index b49f59d42c8..4eca815dc28 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -684,8 +684,8 @@ if ($_REQUEST['action'] == 'remove_file') if ($_POST['addfile']) { // Set tmp user directory - $conf->users->dir_tmp=DOL_DATA_ROOT."/users/".$user->id; - $upload_dir = $conf->users->dir_tmp.'/temp/'; + $vardir=$conf->users->dir_output."/".$user->id; + $upload_dir = $vardir.'/temp/'; if (! empty($_FILES['addedfile']['tmp_name'])) { diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 5d56969054b..5622b5dc3f1 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1110,8 +1110,8 @@ if ($_GET['action'] == 'down' && $user->rights->facture->creer) if ($_POST['addfile']) { // Set tmp user directory - $conf->users->dir_tmp=DOL_DATA_ROOT."/users/".$user->id; - $upload_dir = $conf->users->dir_tmp.'/temp/'; + $vardir=$conf->users->dir_output."/".$user->id; + $upload_dir = $vardir.'/temp/'; if (! empty($_FILES['addedfile']['tmp_name'])) { diff --git a/htdocs/html.formmail.class.php b/htdocs/html.formmail.class.php index a1985f7fef8..7c2f1396e1e 100644 --- a/htdocs/html.formmail.class.php +++ b/htdocs/html.formmail.class.php @@ -100,8 +100,9 @@ class FormMail { global $conf,$user; - $conf->users->dir_tmp=DOL_DATA_ROOT."/users/".$user->id; - $upload_dir = $conf->users->dir_tmp.'/temp'; + // Set tmp user directory + $vardir=$conf->users->dir_output."/".$user->id; + $upload_dir = $vardir.'/temp/'; if (is_dir($upload_dir)) dol_delete_dir_recursive($upload_dir); unset($_SESSION["listofpaths"]);