diff --git a/dev/initdemo/mysqldump_dolibarr_17.0.0.sql b/dev/initdemo/mysqldump_dolibarr_17.0.0.sql index 20112e77bb6..71c7c8e50ea 100644 --- a/dev/initdemo/mysqldump_dolibarr_17.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_17.0.0.sql @@ -1962,6 +1962,7 @@ CREATE TABLE `llx_c_holiday_types` ( `delay` int(11) NOT NULL, `newbymonth` double(8,5) NOT NULL DEFAULT 0.00000, `fk_country` int(11) DEFAULT NULL, + `block_if_negative` int(11) NOT NULL DEFAULT 0, `active` int(11) DEFAULT 1, `sortorder` smallint(6) DEFAULT NULL, PRIMARY KEY (`rowid`), diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index be86f35e0dc..6b7e40ce84a 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -1306,7 +1306,7 @@ if ($num) { // If no record found if ($nbqualified == 0) { - $colspan = 10; + $colspan = 12; print ''.$langs->trans("NoRecordFound").''; } diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index e8075833d22..7bebdcb2af7 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -332,7 +332,7 @@ if ($id > 0 && !preg_match('/^add/i', $action)) { // Remove if ($permissiontodelete && $action != 'edit') { - print ''.$langs->trans("Delete").''."\n"; + print ''.$langs->trans("Delete").''."\n"; } print ''; diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index b79dfb084c5..ab26ed88105 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1860,11 +1860,11 @@ class ActionComm extends CommonObject $imgpicto = img_picto('', 'object_phoning', $color, false, 0, 0, '', 'paddingright'); } elseif ($this->type_code == 'AC_FAX') { $imgpicto = img_picto('', 'object_phoning_fax', $color, false, 0, 0, '', 'paddingright'); - } elseif ($this->type_code == 'AC_EMAIL' || $this->type_code == 'AC_EMAIL_IN' || preg_match('/_SENTBYMAIL/', $this->code)) { + } elseif ($this->type_code == 'AC_EMAIL' || $this->type_code == 'AC_EMAIL_IN' || (!empty($this->code) && preg_match('/_SENTBYMAIL/', $this->code))) { $imgpicto = img_picto('', 'object_email', $color, false, 0, 0, '', 'paddingright'); } elseif ($this->type_code == 'AC_INT') { $imgpicto = img_picto('', 'object_intervention', $color, false, 0, 0, '', 'paddingright'); - } elseif (preg_match('/^TICKET_MSG/', $this->code)) { + } elseif (!empty($this->code) && preg_match('/^TICKET_MSG/', $this->code)) { $imgpicto = img_picto('', 'object_conversation', $color, false, 0, 0, '', 'paddingright'); } elseif ($this->type != 'systemauto') { $imgpicto = img_picto('', 'user-cog', $color, false, 0, 0, '', 'paddingright'); diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 461897ecab0..17bbaef93bf 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -584,7 +584,7 @@ if (!empty($conf->use_javascript_ajax)) { // If javascript on // Local calendar $s .= '
'.$langs->trans("LocalAgenda").'  
'; - if ($user->rights->holiday->read) { + if ($user->hasRight("holiday", "read")) { // Holiday calendar $s .= '
rights->holiday->read) { +if ($user->hasRight("holiday", "read")) { // LEAVE-HOLIDAY CALENDAR $sql = "SELECT u.rowid as uid, u.lastname, u.firstname, u.statut, x.rowid, x.date_debut as date_start, x.date_fin as date_end, x.halfday, x.statut as status"; $sql .= " FROM ".MAIN_DB_PREFIX."holiday as x, ".MAIN_DB_PREFIX."user as u"; diff --git a/htdocs/core/class/cstate.class.php b/htdocs/core/class/cstate.class.php index 46e60b2f7fd..fe5f6b53974 100644 --- a/htdocs/core/class/cstate.class.php +++ b/htdocs/core/class/cstate.class.php @@ -292,4 +292,20 @@ class Cstate // extends CommonObject return 1; } } + + /** + * Return a link to the object card (with optionaly the picto) + * + * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param string $option On what the link point to ('nolink', ...) + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL + */ + public function getNomUrl($withpicto = 0, $option = '', $notooltip = 0, $morecss = '', $save_lastsearch_value = -1) + { + global $langs; + return $langs->trans($this->name); + } } diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php index 8fad21d5e3b..362d61e5325 100644 --- a/htdocs/core/class/dolgraph.class.php +++ b/htdocs/core/class/dolgraph.class.php @@ -1351,7 +1351,7 @@ class DolGraph // Add a callback to change label to show only positive value if (is_array($this->tooltipsLabels) || is_array($this->tooltipsTitles)) { - $this->stringtoshow .= ', tooltips: { mode: \'nearest\', + $this->stringtoshow .= 'tooltips: { mode: \'nearest\', callbacks: {'; if (is_array($this->tooltipsTitles)) { $this->stringtoshow .=' diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 09d01924dda..dd94edf7228 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -9757,7 +9757,7 @@ class Form $nophoto = '/public/theme/common/nophoto.png'; $defaultimg = 'identicon'; // For gravatar if (in_array($modulepart, array('societe', 'userphoto', 'contact', 'memberphoto'))) { // For modules that need a special image when photo not found - if ($modulepart == 'societe' || ($modulepart == 'memberphoto' && strpos($object->morphy, 'mor')) !== false) { + if ($modulepart == 'societe' || ($modulepart == 'memberphoto' && !empty($object->morphy) && strpos($object->morphy, 'mor')) !== false) { $nophoto = 'company'; } else { $nophoto = '/public/theme/common/user_anonymous.png'; diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php index cfe7527cb02..04ecd350227 100644 --- a/htdocs/core/js/lib_head.js.php +++ b/htdocs/core/js/lib_head.js.php @@ -1320,6 +1320,9 @@ jQuery(document).ready(function() { * TODO: Recheck with the select2 GH issue and remove once this is fixed on their side */ +global->MAIN_DISABLE_SELECT2_FOCUS_PROTECTION) && !defined('DISABLE_SELECT2_FOCUS_PROTECTION')) { + ?> $(document).on('select2:open', (e) => { console.log("Execute the focus (click on combo or use space when on component"); const target = $(e.target); @@ -1329,6 +1332,9 @@ $(document).on('select2:open', (e) => { document.querySelector('input[aria-controls*='+id+']').focus(); } }); + // End of lib_head.js.php diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 2f1082c7ca9..084d0cd08b6 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -6817,7 +6817,7 @@ function yn($yesno, $case = 1, $color = 0) $result = 'unknown'; $classname = ''; - if ($yesno == 1 || strtolower($yesno) == 'yes' || strtolower($yesno) == 'true') { // A mettre avant test sur no a cause du == 0 + if ($yesno == 1 || (isset($yesno) && (strtolower($yesno) == 'yes' || strtolower($yesno) == 'true'))) { // A mettre avant test sur no a cause du == 0 $result = $langs->trans('yes'); if ($case == 1 || $case == 3) { $result = $langs->trans("Yes"); diff --git a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php index e281be6ff44..657bf4fee22 100644 --- a/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php +++ b/htdocs/core/modules/asset/doc/doc_generic_asset_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php index ede4554e98a..8ef4046c466 100644 --- a/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php +++ b/htdocs/core/modules/bom/doc/doc_generic_bom_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index c4ecbee453c..f37c35b185a 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index a7cb5ada26c..478799d4518 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 6b7998a121c..5f216bb0ac6 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index f1e30925d3f..9e203e8d5ce 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php index b8cdb48a02f..024248a0ce1 100644 --- a/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php +++ b/htdocs/core/modules/member/doc/doc_generic_member_odt.class.php @@ -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'; } diff --git a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php index ee0532fd949..a87c920e40b 100644 --- a/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php +++ b/htdocs/core/modules/mrp/doc/doc_generic_mo_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php index 1d5116addba..0b8d6676bbf 100644 --- a/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php +++ b/htdocs/core/modules/product/doc/doc_generic_product_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index a0c52ba3b8f..4a94dc85521 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 853329481fe..161eead8533 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php index 76335afc7b5..86d69220ca7 100644 --- a/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php +++ b/htdocs/core/modules/reception/doc/doc_generic_reception_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index c052401203c..985fe9dfd60 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 612aa787dce..f7cdf97f2e5 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php index 94bb2d9fc0c..2b36d7a7a40 100644 --- a/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php +++ b/htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php index a305403d6a6..76b6d2b48c7 100644 --- a/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php +++ b/htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index fd71e68e003..acb0774e8a0 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php index 2d9f9a9e9ae..0e42d2fda58 100644 --- a/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php +++ b/htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php index f1a7ca0f2a3..ca43431055c 100644 --- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php +++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php @@ -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'; } diff --git a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php index 7c86061b057..6df859ed5b1 100644 --- a/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php +++ b/htdocs/core/modules/usergroup/doc/doc_generic_usergroup_odt.modules.php @@ -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'; } diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 5544f790585..49940ef7881 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -828,7 +828,6 @@ print ''; // Action column if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; - //print getTitleFieldOfList(($mode != 'kanban' ? $selectedfields : ''), 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n"; $totalarray['nbfield']++; } foreach ($object->fields as $key => $val) { diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php index 0a67866ce62..9636e7e8d0f 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_list.php +++ b/htdocs/eventorganization/conferenceorboothattendee_list.php @@ -293,7 +293,7 @@ if ($object->ismultientitymanaged == 1) { $sql .= " WHERE 1 = 1"; } if (!empty($projectstatic->id)) { - $sql .= " AND t.fk_project=".((int) $projectstatic->id); + $sql .= " AND t.fk_project = ".((int) $projectstatic->id); } foreach ($search as $key => $val) { if (array_key_exists($key, $object->fields)) { @@ -375,7 +375,7 @@ $num = $db->num_rows($resql); if ($num == 1 && !empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && $search_all && !$page) { $obj = $db->fetch_object($resql); $id = $obj->rowid; - header("Location: ".dol_buildpath('/eventorganization/conferenceorboothattendee_card.php', 1).'?id='.$id); + header("Location: ".DOL_URL_ROOT.'/eventorganization/conferenceorboothattendee_card.php?id='.((int) $id)); exit; } @@ -600,7 +600,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) { //print ''; print ''; $linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id; - $encodedsecurekey = dol_hash(getDolUserString("EVENTORGANIZATION_SECUREKEYEVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5'); + $encodedsecurekey = dol_hash(getDolGlobalString("EVENTORGANIZATION_SECUREKEY").'conferenceorbooth'.$projectstatic->id, 'md5'); $linksuggest .= '&securekey='.urlencode($encodedsecurekey); //print '