Skip to content

Commit

Permalink
Add an exit to avoid to have apache hangs.
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed May 5, 2015
1 parent c665bfa commit f97d817
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions htdocs/core/modules/export/export_excel.modules.php
Expand Up @@ -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 (
Expand Down Expand Up @@ -426,7 +426,7 @@ function close_file()
$this->workbook->disconnectWorksheets();
unset($this->workbook);
}
return 0;
return 1;
}


Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/export/export_excel2007.modules.php
Expand Up @@ -95,7 +95,7 @@ function close_file()
$this->workbook->disconnectWorksheets();
unset($this->workbook);
}
return 0;
return 1;
}

}
Expand Down
6 changes: 4 additions & 2 deletions htdocs/exports/export.php
Expand Up @@ -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');

Expand Down Expand Up @@ -1142,6 +1142,7 @@

print '</td><td width="50%">&nbsp;</td></tr>';
print '</table>';

}

print '<br>';
Expand All @@ -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

This comment has been minimized.

Copy link
@rdoursenaud

rdoursenaud May 5, 2015

Contributor

Could this be because the getablenamefromfield() is defined after being called which is not very good practice?
It could be harmlessly moved to the actions section anyway.



/**
* Return table name of an alias. For this, we look for the "tablename as alias" in sql string.
Expand All @@ -1172,4 +1175,3 @@ function getablenamefromfield($code,$sqlmaxforexport)
}
else return '';
}

0 comments on commit f97d817

Please sign in to comment.