diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 95c0c59a9cd..a44e5f2450e 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -434,8 +434,11 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se // Create output dir if not exists dol_mkdir($diroutputmassaction); - // Save merged file + // Defined name of merged file $filename=strtolower(dol_sanitizeFileName($langs->transnoentities($objectlabel))); + $filename=preg_replace('/\s/','_',$filename); + + // Save merged file if ($filter=='paye:0') { if ($option=='late') $filename.='_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Unpaid"))).'_'.strtolower(dol_sanitizeFileName($langs->transnoentities("Late"))); diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php index 955bffecb67..3310aa8e2c4 100644 --- a/htdocs/core/lib/files.lib.php +++ b/htdocs/core/lib/files.lib.php @@ -1821,7 +1821,7 @@ function dol_check_secure_access_document($modulepart,$original_file,$entity,$fu { $accessallowed=1; } - $original_file=$conf->propal->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; + $original_file=$conf->supplier_proposal->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file; } else if ($modulepart == 'massfilesarea_supplier_order') { diff --git a/htdocs/langs/en_US/supplier_proposal.lang b/htdocs/langs/en_US/supplier_proposal.lang index 621d7784e35..dc3eae23672 100644 --- a/htdocs/langs/en_US/supplier_proposal.lang +++ b/htdocs/langs/en_US/supplier_proposal.lang @@ -47,7 +47,7 @@ CommercialAsk=Price request DefaultModelSupplierProposalCreate=Default model creation DefaultModelSupplierProposalToBill=Default template when closing a price request (accepted) DefaultModelSupplierProposalClosed=Default template when closing a price request (refused) -ListOfSupplierProposal=List of supplier proposal requests +ListOfSupplierProposals=List of supplier proposal requests ListSupplierProposalsAssociatedProject=List of supplier proposals associated with project SupplierProposalsToClose=Supplier proposals to close SupplierProposalsToProcess=Supplier proposals to process diff --git a/htdocs/supplier_proposal/list.php b/htdocs/supplier_proposal/list.php index 3624101d7cf..10ac76b48dd 100644 --- a/htdocs/supplier_proposal/list.php +++ b/htdocs/supplier_proposal/list.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2017 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2005-2013 Regis Houssin @@ -316,11 +316,11 @@ if ($result) { $soc = new Societe($db); $soc->fetch($socid); - $title = $langs->trans('ListOfProposals') . ' - '.$soc->name; + $title = $langs->trans('ListOfSupplierProposals') . ' - '.$soc->name; } else { - $title = $langs->trans('ListOfProposals'); + $title = $langs->trans('ListOfSupplierProposals'); } $num = $db->num_rows($result); @@ -706,10 +706,10 @@ if ($result) $urlsource.=str_replace('&','&',$param); $filedir=$diroutputmassaction; - $genallowed=$user->rights->propal->lire; - $delallowed=$user->rights->propal->lire; + $genallowed=$user->rights->supplier_proposal->lire; + $delallowed=$user->rights->supplier_proposal->lire; - print $formfile->showdocuments('massfilesarea_proposals','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'',''); + print $formfile->showdocuments('massfilesarea_supplier_proposal','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'',''); } else {