Fix #7921 : For invoice with "/" in ref
Fix #7921 : For invoice with "/" in ref
This commit is contained in:
parent
8189be0ac4
commit
7cd785d59a
@ -728,13 +728,14 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se
|
||||
}
|
||||
|
||||
$arrayofinclusion=array();
|
||||
foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote($tmppdf.'.pdf','/').'$';
|
||||
foreach($listofobjectref as $tmppdf) $arrayofinclusion[]='^'.preg_quote(dol_sanitizeFileName($tmppdf).'.pdf','/').'$';
|
||||
$listoffiles = dol_dir_list($uploaddir,'all',1,implode('|',$arrayofinclusion),'\.meta$|\.png','date',SORT_DESC,0,true);
|
||||
|
||||
// build list of files with full path
|
||||
$files = array();
|
||||
foreach($listofobjectref as $basename)
|
||||
{
|
||||
$basename = dol_sanitizeFileName($basename);
|
||||
foreach($listoffiles as $filefound)
|
||||
{
|
||||
if (strstr($filefound["name"],$basename))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user