Fix: Lost pagecode after csv export
This commit is contained in:
parent
9eab44536d
commit
380691bb39
@ -217,7 +217,7 @@ class Export
|
||||
// Build the sql request
|
||||
$sql=$this->array_export_sql_start[$indice];
|
||||
$i=0;
|
||||
|
||||
|
||||
//print_r($array_selected);
|
||||
foreach ($this->array_export_fields[$indice] as $key => $value)
|
||||
{
|
||||
@ -254,14 +254,14 @@ class Export
|
||||
asort($array_selected);
|
||||
|
||||
dol_syslog("Export::build_file $model, $datatoexport, $array_selected");
|
||||
|
||||
|
||||
// Check parameters or context properties
|
||||
if (! is_array($this->array_export_fields[$indice]))
|
||||
{
|
||||
$this->error="ErrorBadParameter";
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// Creation de la classe d'export du model ExportXXX
|
||||
$dir = DOL_DOCUMENT_ROOT . "/core/modules/export/";
|
||||
$file = "export_".$model.".modules.php";
|
||||
@ -283,7 +283,7 @@ class Export
|
||||
$filename.='.'.$objmodel->getDriverExtension();
|
||||
$dirname=$conf->export->dir_temp.'/'.$user->id;
|
||||
|
||||
$outputlangs=$langs; // Lang for output
|
||||
$outputlangs=dol_clone($langs); // We clone to have an object we can modify (for example to change output charset by csv handler) without changing original value
|
||||
|
||||
// Open file
|
||||
dol_mkdir($dirname);
|
||||
@ -333,7 +333,8 @@ class Export
|
||||
|
||||
// Close file
|
||||
$objmodel->close_file();
|
||||
return 1;
|
||||
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user