From 4846885eea9606fc3d8049b4df63066937970eba Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Mon, 2 Dec 2019 16:54:05 +0100 Subject: [PATCH 1/5] NEW 9.0: enable user to use the mysqldump '--quick' option (useful if the server has low RAM or large tables) --- htdocs/admin/tools/dolibarr_export.php | 9 ++++++++- htdocs/core/class/utils.class.php | 1 + htdocs/langs/en_US/admin.lang | 2 ++ htdocs/langs/fr_FR/admin.lang | 2 ++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 231699dc636..d04840e2d71 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -211,7 +211,6 @@ print '';
-
global->MYSQL_OLD_OPTION_DISABLE_FK)) { ?> @@ -234,6 +233,14 @@ print '';
+ + +
diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 6b6d2d42c67..8ce4cca7ca6 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -262,6 +262,7 @@ class Utils if (GETPOST("disable_fk", "alpha") || $usedefault) $param.=" -K"; if (GETPOST("sql_compat", "alpha") && GETPOST("sql_compat", "alpha") != 'NONE') $param.=" --compatible=".escapeshellarg(GETPOST("sql_compat", "alpha")); if (GETPOST("drop_database", "alpha")) $param.=" --add-drop-database"; + if (GETPOST("use_mysql_quick_param", "alpha"))$param.=" --quick"; if (GETPOST("sql_structure", "alpha") || $usedefault) { if (GETPOST("drop", "alpha") || $usedefault) $param.=" --add-drop-table=TRUE"; diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index d70bfe959e9..b477298f88a 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -174,6 +174,8 @@ Compression=Compression CommandsToDisableForeignKeysForImport=Command to disable foreign keys on import CommandsToDisableForeignKeysForImportWarning=Mandatory if you want to be able to restore your sql dump later ExportCompatibility=Compatibility of generated export file +ExportUseMySQLQuickParameter=Use the --quick parameter +ExportUseMySQLQuickParameterHelp=The '--quick' parameter helps limit RAM consumption for large tables. MySqlExportParameters=MySQL export parameters PostgreSqlExportParameters= PostgreSQL export parameters UseTransactionnalMode=Use transactional mode diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 4b7cb82e4d4..8abb4dd8d29 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -174,6 +174,8 @@ Compression=Compression CommandsToDisableForeignKeysForImport=Commande pour désactiver les clés étrangères à l'importation CommandsToDisableForeignKeysForImportWarning=Requis si vous voulez être en mesure de restaurer votre « dump » SQL plus tard ExportCompatibility=Compatibilité du fichier d'exportation généré +ExportUseMySQLQuickParameter=Utiliser le paramètre --quick +ExportUseMySQLQuickParameterHelp=permet de limiter la consommation de mémoire vive (utile en cas de tables volumineuses) MySqlExportParameters=Paramètres de l'exportation MySQL PostgreSqlExportParameters= Paramètres de l'exportation PostgreSQL UseTransactionnalMode=Utiliser le mode transactionnel From cec54d6ce0e9b47db1e988c2a21a183fd64331b8 Mon Sep 17 00:00:00 2001 From: gauthier Date: Tue, 3 Dec 2019 16:40:35 +0100 Subject: [PATCH 2/5] FIX : when we need to bill several orders, order lines unit is not on bill lines --- htdocs/core/actions_massactions.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 2f5f03ee5a8..62d8e2466b0 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -701,7 +701,10 @@ if ($massaction == 'confirm_createbills') $lines[$i]->fk_fournprice, $lines[$i]->pa_ht, $lines[$i]->label, - $array_options + $array_options, + 100, + 0, + $lines[$i]->fk_unit ); if ($result > 0) { From 60d3bd0fe9379feca12dd3e9c6b87a64ba048953 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Dec 2019 22:36:26 +0100 Subject: [PATCH 3/5] Fix regression --- htdocs/core/lib/pdf.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 6c2fb96e76c..af1da161dc7 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1256,8 +1256,10 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"]; } } - elseif ($object->type == Facture::TYPE_DEPOSIT && $object->element == 'facture') { - $desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc); + elseif ($object->element == 'facture' || $object->element == 'facturefourn') { + if ($object->type == $object::TYPE_DEPOSIT) { + $desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc); + } } // Description short of product line From a75915a7a85823724ff77d34047d29a17ac517e3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 3 Dec 2019 22:37:58 +0100 Subject: [PATCH 4/5] Fix regression --- htdocs/core/lib/pdf.lib.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 8fa12241643..3d22733ee7f 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1238,8 +1238,10 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"]; } } - elseif ($object->type == Facture::TYPE_DEPOSIT && $object->element == 'facture') { - $desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc); + elseif ($object->element == 'facture' || $object->element == 'facturefourn') { + if ($object->type == $object::TYPE_DEPOSIT) { + $desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc); + } } // Description short of product line From 394104291a430cf3e7eda6ad99ba66f3e98f25c9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 8 Dec 2019 04:22:09 +0100 Subject: [PATCH 5/5] Fix function not found when creating a payment of an expense report --- htdocs/core/lib/functions.lib.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index cff0ef2b8ef..6bc3fcd0866 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1251,6 +1251,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r { if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experience trouble with pdf thumb generation and imagick, you can disable here. { + include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; $ret = dol_convert_file($file, 'png', $fileimage); if ($ret < 0) $error++; }