From f298f302ff2fb0b090ead9bed4f4d94e61a4b9e8 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 25 Mar 2011 19:15:37 +0000 Subject: [PATCH] Fix: problem for delete an attach file --- htdocs/comm/mailing/fiche.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 5d5a6c57e32f0..e712979b115a5 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -301,7 +301,7 @@ { $mil = new Mailing($db); $result=$mil->fetch($_POST["mailid"]); - + $error=0; $upload_dir = $conf->mailing->dir_output . "/" . get_exdir($mil->id,2,0,1); @@ -312,7 +312,7 @@ $message='
'.$langs->trans("ErrorFieldRequired",$langs->trans("MailTo")).'
'; $error++; } - + if (! $error) { // Ajout CSS @@ -428,7 +428,7 @@ } // Action update emailing -if (! empty($_POST["removedfile"])) +if (! empty($_POST["removedfileid"])) { $mil = new Mailing($db); $mil->fetch($_POST["id"]); @@ -438,7 +438,7 @@ $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); @@ -653,7 +653,7 @@ $head = emailing_prepare_head($mil); dol_fiche_head($head, 'card', $langs->trans("Mailing"), 0, 'email'); - + if ($message) print $message."
"; // Confirmation de la validation du mailing @@ -757,7 +757,7 @@ $text=$langs->trans('NotEnoughPermissions'); print $html->textwithpicto($nbemail,$text,1,'warning'); } - + } else { @@ -915,7 +915,6 @@ foreach($listofpaths as $key => $val) { print img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name']; - //print ' '; print '
'; } } @@ -1002,7 +1001,8 @@ foreach($listofpaths as $key => $val) { print img_mime($listofpaths[$key]['name']).' '.$listofpaths[$key]['name']; - print ' '; + print ' '; + print ''; print '
'; } }