From f97d81701b40e2257ec924fc19c772e0b46dec97 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 5 May 2015 13:46:28 +0200 Subject: [PATCH] Add an exit to avoid to have apache hangs. --- htdocs/core/modules/export/export_excel.modules.php | 4 ++-- htdocs/core/modules/export/export_excel2007.modules.php | 2 +- htdocs/exports/export.php | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/export/export_excel.modules.php b/htdocs/core/modules/export/export_excel.modules.php index e52811502969f..734b38f601a22 100644 --- a/htdocs/core/modules/export/export_excel.modules.php +++ b/htdocs/core/modules/export/export_excel.modules.php @@ -190,7 +190,7 @@ function open_file($file,$outputlangs) return -1; } } - + if (!empty($conf->global->MAIN_USE_FILECACHE_EXPORT_EXCEL_DIR)) { $cacheMethod = PHPExcel_CachedObjectStorageFactory::cache_to_discISAM; $cacheSettings = array ( @@ -426,7 +426,7 @@ function close_file() $this->workbook->disconnectWorksheets(); unset($this->workbook); } - return 0; + return 1; } diff --git a/htdocs/core/modules/export/export_excel2007.modules.php b/htdocs/core/modules/export/export_excel2007.modules.php index bf70c30ab1c33..4f37a2e323e87 100644 --- a/htdocs/core/modules/export/export_excel2007.modules.php +++ b/htdocs/core/modules/export/export_excel2007.modules.php @@ -95,7 +95,7 @@ function close_file() $this->workbook->disconnectWorksheets(); unset($this->workbook); } - return 0; + return 1; } } diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index 4b565069b5cc0..c1b0262fd401d 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -992,7 +992,7 @@ if ($step == 5 && $datatoexport) { - asort($array_selected); + asort($array_selected); llxHeader('',$langs->trans("NewExport"),'EN:Module_Exports_En|FR:Module_Exports|ES:Módulo_Exportaciones'); @@ -1142,6 +1142,7 @@ print ' '; print ''; + } print '
'; @@ -1150,6 +1151,8 @@ $db->close(); +exit; // don't know why but apache hangs with php 5.3.10-1ubuntu3.12 and apache 2.2.2 if i remove this exit or replace with return + /** * Return table name of an alias. For this, we look for the "tablename as alias" in sql string. @@ -1172,4 +1175,3 @@ function getablenamefromfield($code,$sqlmaxforexport) } else return ''; } -