mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
getDol rather than ->global
This commit is contained in:
@@ -262,8 +262,8 @@ class doc_generic_asset_odt extends ModelePDFAsset
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -274,8 +274,8 @@ class doc_generic_bom_odt extends ModelePDFBom
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -280,8 +280,8 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -278,8 +278,8 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -278,8 +278,8 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -278,8 +278,8 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -268,8 +268,8 @@ class doc_generic_member_odt extends ModelePDFMember
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -267,8 +267,8 @@ class doc_generic_mo_odt extends ModelePDFMo
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -276,8 +276,8 @@ class doc_generic_product_odt extends ModelePDFProduct
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -559,8 +559,8 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -312,8 +312,8 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -271,8 +271,8 @@ class doc_generic_reception_odt extends ModelePdfReception
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -252,8 +252,8 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
$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)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -278,8 +278,8 @@ class doc_generic_stock_odt extends ModelePDFStock
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -271,8 +271,8 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -266,8 +266,8 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
|
||||
//$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt';
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -300,8 +300,8 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -266,8 +266,8 @@ class doc_generic_ticket_odt extends ModelePDFTicket
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -300,8 +300,8 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
@@ -282,8 +282,8 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
|
||||
// Get extension (ods or odt)
|
||||
$newfileformat = substr($newfile, strrpos($newfile, '.') + 1);
|
||||
if (!empty($conf->global->MAIN_DOC_USE_TIMING)) {
|
||||
$format = $conf->global->MAIN_DOC_USE_TIMING;
|
||||
if (getDolGlobalInt('MAIN_DOC_USE_TIMING')) {
|
||||
$format = getDolGlobalInt('MAIN_DOC_USE_TIMING');
|
||||
if ($format == '1') {
|
||||
$format = '%Y%m%d%H%M%S';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user