From fadf293b318d8358f99ae17bde1b923260f55b8a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 22 Oct 2006 01:43:06 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Correctif=20bug=20detect=E9=20par=20Yann?= =?UTF-8?q?ick?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/facture/document.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 93b2ca25897..713ad9e527e 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -131,7 +131,10 @@ if ($facid > 0) $i=0; while (($file = readdir($handle))!==false) { - if (!is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') + if (! is_dir($dir.$file) + && ! eregi('^\.',$file) + && ! eregi('^CVS',$file) + && ! eregi('\.meta$',$file)) { $filearray[$i]=$file; $totalsize+=filesize($upload_dir."/".$file); @@ -161,7 +164,7 @@ if ($facid > 0) print ''; - if ($mesg) { print "$mesg
"; } + if ($mesg) { print $mesg."
"; } // Affiche formulaire upload if ($conf->global->MAIN_UPLOAD_DOC) @@ -205,15 +208,17 @@ if ($facid > 0) $var=true; while (($file = readdir($handle))!==false) { - if (! is_dir($dir.$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS' - && ! eregi('\.meta$',$file)) + if (! is_dir($dir.$file) + && ! eregi('^\.',$file) + && ! eregi('^CVS',$file) + && ! eregi('\.meta$',$file)) { $var=!$var; print ''; print ''; echo ''.$file.''; print "\n"; - print ''.filesize($upload_dir.'/'.$file). ' bytes'; + print ''.filesize($upload_dir.'/'.$file). ' '.$langs->trans("bytes").''; print ''.strftime('%d %b %Y %H:%M:%S',filemtime($upload_dir.'/'.$file)).''; print ''; if ($file == $facref . '.pdf')