Skip to content

Commit

Permalink
Provide a new constant about odt2pdf mangement : Don't remove odt source
Browse files Browse the repository at this point in the history
* MAIN_ODT_AS_PDF_DEL_SOURCE by default disable
* If set then initial behaviour is conserved, odt file is removed
  • Loading branch information
camlafit committed Jan 6, 2014
1 parent eb5b6ef commit 1229842
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions htdocs/includes/odtphp/odf.php
Expand Up @@ -478,7 +478,8 @@ public function exportAsAttachedPDF($name="")
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);
Expand Down Expand Up @@ -555,4 +556,4 @@ private function _rrmdir($dir)
}
}

?>
?>

0 comments on commit 1229842

Please sign in to comment.