From 5a34a229347487a7fe453bf5e31365503817e663 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 7 Apr 2018 13:04:52 +0200 Subject: [PATCH] Code comment --- htdocs/core/class/html.formfile.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index f3ee31653f7..55e8a5dcb51 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -841,9 +841,10 @@ class FormFile $out=''; $this->infofiles=array('nboffiles'=>0,'extensions'=>array(),'files'=>array()); + // Get list of files starting with name of ref (but not followed by "-" to discard uploaded files and get only generated files) + // @TODO Why not showing all files by just removing the '[^\-]+' at end of regex ? $filterforfilesearch = preg_quote(basename($modulesubdir),'/').'[^\-]+'; - - $file_list=dol_dir_list($filedir, 'files', 0, $filterforfilesearch, '\.meta$|\.png$'); // Get list of files starting with name of ref (but not followed by "-" to discard uploaded files) + $file_list=dol_dir_list($filedir, 'files', 0, $filterforfilesearch, '\.meta$|\.png$'); // We also discard .meta and .png preview //var_dump($file_list); // For ajax treatment