Fix: Must not use DOL_DATA_ROOT directly
This commit is contained in:
parent
04915533f2
commit
6d225588e5
@ -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']))
|
||||
{
|
||||
|
||||
@ -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']))
|
||||
{
|
||||
|
||||
@ -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']))
|
||||
{
|
||||
|
||||
@ -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']))
|
||||
{
|
||||
|
||||
@ -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"]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user