mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-08 00:52:01 +01:00
add translation
This commit is contained in:
@@ -256,7 +256,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_OBJECT_THIRDPARTY_NAME)) {
|
||||
$newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)).'-'.$newfiletmp;
|
||||
$newfiletmp = dol_sanitizeFileName(dol_string_nospecial($object->name)) . '-' . $newfiletmp;
|
||||
$newfiletmp = preg_replace('/__+/', '_', $newfiletmp); // Replace repeated _ into one _ (to avoid string with substitution syntax)
|
||||
}
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
@@ -264,11 +264,11 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
$filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat;
|
||||
} else {
|
||||
$filename = $newfiletmp.'.'.$newfileformat;
|
||||
$filename = $newfiletmp . '.' . $newfileformat;
|
||||
}
|
||||
$file = $dir.'/'.$filename;
|
||||
$file = $dir . '/' . $filename;
|
||||
$object->builddoc_filename = $filename; // For triggers
|
||||
//print "newfileformat=".$newfileformat;
|
||||
//print "newdir=".$dir;
|
||||
@@ -279,8 +279,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
|
||||
dol_mkdir($conf->societe->multidir_temp[$object->entity]);
|
||||
if (!is_writable($conf->societe->multidir_temp[$object->entity])) {
|
||||
$this->error = "Failed to write in temp directory ".$conf->societe->multidir_temp[$object->entity];
|
||||
dol_syslog('Error in write_file: '.$this->error, LOG_ERR);
|
||||
$this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->societe->multidir_temp[$object->entity]);
|
||||
dol_syslog('Error in write_file: ' . $this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user