diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php
index a262077e2a3..9bd5b28e911 100644
--- a/htdocs/comm/mailing/fiche.php
+++ b/htdocs/comm/mailing/fiche.php
@@ -428,7 +428,7 @@ if ($_REQUEST["action"] == 'setdesc' || $_REQUEST["action"] == 'setfrom' || $_RE
}
// Action update emailing
-if (! empty($_POST["removedfile"]))
+if (! empty($_POST["removedfileid"]))
{
$mil = new Mailing($db);
$mil->fetch($_POST["id"]);
@@ -438,7 +438,7 @@ if (! empty($_POST["removedfile"]))
$listofpaths=dol_dir_list($upload_dir,'all',0,'','','name',SORT_ASC,0);
// Remove file
- $filenb=($_POST["removedfile"]-1);
+ $filenb=($_POST["removedfileid"]-1);
if (isset($listofpaths[$filenb]))
{
$result=dol_delete_file($listofpaths[$filenb]['fullname'],1);
@@ -1001,7 +1001,8 @@ else
foreach($listofpaths as $key => $val)
{
print img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name'];
- print ' ';
+ print ' ';
+ print '';
print '
';
}
}