From 5a98207998376413f698f22e8e82459f4af3449f Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 7 Mar 2019 11:19:55 +0100 Subject: [PATCH 1/3] avoid timeout --- htdocs/core/modules/export/export_csv.modules.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 249d1563988..5bdc2f384ac 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -24,6 +24,8 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/export/modules_export.php'; +// avoid timeout for big export +set_time_limit(0); /** * Class to build export files with format CSV From 1b26f1fa08327dd93aa518cd0acaa20a49ecc877 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 7 Mar 2019 11:26:21 +0100 Subject: [PATCH 2/3] remove avoid timeout --- htdocs/core/modules/export/export_csv.modules.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/htdocs/core/modules/export/export_csv.modules.php b/htdocs/core/modules/export/export_csv.modules.php index 5bdc2f384ac..249d1563988 100644 --- a/htdocs/core/modules/export/export_csv.modules.php +++ b/htdocs/core/modules/export/export_csv.modules.php @@ -24,8 +24,6 @@ require_once DOL_DOCUMENT_ROOT .'/core/modules/export/modules_export.php'; -// avoid timeout for big export -set_time_limit(0); /** * Class to build export files with format CSV From d414e3eb488f74f000d57436fce474fa3c37bc09 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 7 Mar 2019 15:00:48 +0100 Subject: [PATCH 3/3] add product extrafields --- htdocs/core/modules/modExpedition.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index e096d840864..f0b302d7a29 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -283,6 +283,8 @@ class modExpedition extends DolibarrModules include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $keyforselect='expeditiondet'; $keyforelement='shipment_line'; $keyforaliasextra='extra2'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; + $keyforselect='product'; $keyforelement='product'; $keyforaliasextra='extraprod'; + include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; $this->export_sql_start[$r]='SELECT DISTINCT '; $this->export_sql_end[$r] =' FROM '.MAIN_DB_PREFIX.'expedition as c'; @@ -295,6 +297,7 @@ class modExpedition extends DolibarrModules $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'expeditiondet_extrafields as extra2 ON ed.rowid = extra2.fk_object'; $this->export_sql_end[$r] .=' , '.MAIN_DB_PREFIX.'commandedet as cd'; $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product as p on cd.fk_product = p.rowid'; + $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extraprod ON p.rowid = extraprod.fk_object'; if ($idcontacts && ! empty($conf->global->SHIPMENT_ADD_CONTACTS_IN_EXPORT)) { $this->export_sql_end[$r] .=' LEFT JOIN '.MAIN_DB_PREFIX.'element_contact as ee ON ee.element_id = cd.fk_commande AND ee.fk_c_type_contact IN ('.$idcontacts.')';