Provide a new constant about odt2pdf mangement : Don't remove odt source

* MAIN_ODT_AS_PDF_DEL_SOURCE by default disable
* If set then initial behaviour is conserved, odt file is removed
This commit is contained in:
cam.lafit 2014-01-06 19:27:12 +01:00
parent eb5b6efd40
commit 1229842dc6

View File

@ -478,7 +478,8 @@ IMG;
header('Content-Disposition: attachment; filename="'.$name.'.pdf"');
readfile("$name.pdf");
}
unlink("$name.odt");
if (!empty($conf->global->MAIN_ODT_AS_PDF_DEL_SOURCE))
unlink("$name.odt");
} else {
dol_syslog(get_class($this).'::exportAsAttachedPDF $ret_val='.$retval, LOG_DEBUG);
dol_syslog(get_class($this).'::exportAsAttachedPDF $output_arr='.var_export($output_arr,true), LOG_DEBUG);
@ -555,4 +556,4 @@ IMG;
}
}
?>
?>