New hidden option to introduce timing value into odt document nam

This commit is contained in:
JF FERRY 2013-04-21 17:04:54 +02:00
parent 83028b958a
commit 642ba10d84

View File

@ -215,7 +215,14 @@ class doc_generic_odt extends ModeleThirdPartyDoc
$newfiletmp=preg_replace('/modele_/i','',$newfiletmp);
// Get extension (ods or odt)
$newfileformat=substr($newfile, strrpos($newfile, '.')+1);
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
if ( ! empty($conf->global->MAIN_ODT_USE_TIMING))
{
$filename=$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.'.$newfileformat;
}
else
{
$filename=$newfiletmp.'.'.$newfileformat;
}
$file=$dir.'/'.$filename;
$object->builddoc_filename=$filename; // For triggers
//print "newfileformat=".$newfileformat;