Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 14.0

This commit is contained in:
Laurent Destailleur 2022-03-16 20:10:52 +01:00
commit 14578820ef
2 changed files with 4 additions and 4 deletions

View File

@ -376,9 +376,9 @@ class Utils
continue; continue;
} }
fwrite($handle, $read.($execmethod == 2 ? '' : "\n")); fwrite($handle, $read.($execmethod == 2 ? '' : "\n"));
if (preg_match('/'.preg_quote('-- Dump completed').'/i', $read)) { if (preg_match('/'.preg_quote('-- Dump completed', '/').'/i', $read)) {
$ok = 1; $ok = 1;
} elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i', $read)) { } elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES', '/').'/i', $read)) {
$ok = 1; $ok = 1;
} }
} }

View File

@ -290,11 +290,11 @@ class pdf_crabe extends ModelePDFFactures
// Definition of $dir and $file // Definition of $dir and $file
if ($object->specimen) { if ($object->specimen) {
$dir = $conf->facture->dir_output; $dir = empty($conf->facture->multidir_output[$conf->entity]) ? $conf->facture->dir_output : $conf->facture->multidir_output[$conf->entity];
$file = $dir."/SPECIMEN.pdf"; $file = $dir."/SPECIMEN.pdf";
} else { } else {
$objectref = dol_sanitizeFileName($object->ref); $objectref = dol_sanitizeFileName($object->ref);
$dir = $conf->facture->dir_output."/".$objectref; $dir = (empty($conf->facture->multidir_output[$conf->entity]) ? $conf->facture->dir_output : $conf->facture->multidir_output[$conf->entity])."/".$objectref;
$file = $dir."/".$objectref.".pdf"; $file = $dir."/".$objectref.".pdf";
} }
if (!file_exists($dir)) { if (!file_exists($dir)) {