diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index f7c8df2a6c0..e878c0fc7f0 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -1803,13 +1803,6 @@ class Form $var=true; $filename = sanitize_string($filename); - // Par defaut - $extension = 'pdf'; - $relativepath = "${filename}/${filename}.${extension}"; - // Autre cas - if ($modulepart == 'expedition') { $extension='pdf'; $relativepath = get_exdir("${filename}")."${filename}.pdf"; } - if ($modulepart == 'don') { $extension='html'; $relativepath = get_exdir("${filename}")."${filename}.html"; } - $headershown=0; // Affiche en-tete tableau @@ -1864,7 +1857,10 @@ class Form while (($file = readdir($handle))!==false) { // Si fichier non lisible ou mauvaise extension, on passe au suivant - if (! is_readable($filedir."/".$file) || ! eregi('\.'.$extension.'$',$file)) continue; + if (! is_readable($filedir."/".$file) || + eregi('\.meta$',$file) || + eregi('\.$',$file) + ) continue; if (! $headershown) { @@ -1875,19 +1871,29 @@ class Form print '
| '.$mimetype.' | '; - // print ''.$file.' | '; - - print ''.$file.' | '; - - + // Affiche nom fichier avec lien download + print ''.$file.' | '; + // Affiche taille fichier print ''.filesize($filedir."/".$file). ' bytes | '; + // Affiche date fichier print ''.strftime("%d %b %Y %H:%M:%S",filemtime($filedir."/".$file)).' | '; + print '