commit
0d08231cd8
@ -240,7 +240,10 @@ if ($section)
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.form.class.php';
|
||||||
$useglobalvars=1;
|
$useglobalvars=1;
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formquestion=array('urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile'));
|
$formquestion=array(
|
||||||
|
'urlfile'=>array('type'=>'hidden','value'=>$urlfile,'name'=>'urlfile'),
|
||||||
|
'section'=>array('type'=>'hidden','value'=>$section,'name'=>'section')
|
||||||
|
);
|
||||||
print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0));
|
print $form->formconfirm($url,$langs->trans("DeleteFile"),$langs->trans("ConfirmDeleteFile"),'confirm_deletefile',$formquestion,"no",($useajax?'deletefile':0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -175,10 +175,9 @@ if ($action == 'confirm_deletefile')
|
|||||||
dol_print_error($db,$ecmdir->error);
|
dol_print_error($db,$ecmdir->error);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
$relativepath=$ecmdir->getRelativePath();
|
|
||||||
}
|
}
|
||||||
else $relativepath='';
|
else $relativepath='';
|
||||||
$upload_dir = $conf->ecm->dir_output.($relativepath?'/'.$relativepath:'');
|
$upload_dir = $conf->ecm->dir_output;
|
||||||
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_POST are already decoded by PHP).
|
$file = $upload_dir . "/" . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_POST are already decoded by PHP).
|
||||||
|
|
||||||
$ret=dol_delete_file($file);
|
$ret=dol_delete_file($file);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user