Add hidden option MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP
This commit is contained in:
parent
093c367609
commit
259f3b3020
@ -863,8 +863,15 @@ class FormFile
|
||||
}
|
||||
|
||||
// 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),'/').'[^\-]+';
|
||||
// @TODO Why not showing by default all files by just removing the '[^\-]+' at end of regex ?
|
||||
if (! empty($conf->global->MAIN_SHOW_ALL_FILES_ON_DOCUMENT_TOOLTIP))
|
||||
{
|
||||
$filterforfilesearch = preg_quote(basename($modulesubdir),'/');
|
||||
}
|
||||
else
|
||||
{
|
||||
$filterforfilesearch = preg_quote(basename($modulesubdir),'/').'[^\-]+';
|
||||
}
|
||||
$file_list=dol_dir_list($filedir, 'files', 0, $filterforfilesearch, '\.meta$|\.png$'); // We also discard .meta and .png preview
|
||||
|
||||
//var_dump($file_list);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user