diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 5fa90b6f14d..989aa6a6692 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -1479,7 +1479,7 @@ if ($resql) $paramwithoutshowfiles=preg_replace('/show_files=1&?/','',$param); $title=$langs->trans("MassFilesArea").' ('.$langs->trans("Hide").')'; - print $formfile->showdocuments('massfilesarea','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,''); + print $formfile->showdocuments('massfilesarea_facture','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,''); } else { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 00790ebc9fd..8a259ce2e57 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -569,15 +569,15 @@ class FormFile $reshook = $hookmanager->executeHooks('formBuilddocOptions',$parameters,$GLOBALS['object']); $out.= $hookmanager->resPrint; } - } + } // Get list of files if (! empty($filedir)) { $file_list=dol_dir_list($filedir,'files',0,'','(\.meta|_preview\.png)$','date',SORT_DESC); // Show title of array if not already shown - if ((! empty($file_list) || $modulepart == 'massfilesarea') && ! $headershown) + if ((! empty($file_list) || preg_match('/^massfilesarea', $modulepart)) && ! $headershown) { $headershown=1; $out.= '