From e9892fdc3215be0f4697358a146956ce432d2c2b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 15:47:55 +0200 Subject: [PATCH 01/16] css --- htdocs/accountancy/journal/variousjournal.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/journal/variousjournal.php b/htdocs/accountancy/journal/variousjournal.php index 49b4fc2c98c..af32b85d8fa 100644 --- a/htdocs/accountancy/journal/variousjournal.php +++ b/htdocs/accountancy/journal/variousjournal.php @@ -236,7 +236,7 @@ if ($some_mandatory_steps_of_setup_were_not_done) { print ' : ' . $langs->trans("AccountancyAreaDescMisc", 4, '' . $langs->transnoentitiesnoconv("MenuAccountancy") . '-' . $langs->transnoentitiesnoconv("Setup") . "-" . $langs->transnoentitiesnoconv("MenuDefaultAccounts") . ''); print ''; } -print '
'; +print '
'; if (!empty($conf->global->ACCOUNTING_ENABLE_EXPORT_DRAFT_JOURNAL) && $in_bookkeeping == 'notyet') { print ''; } From 89f7e5ad30ed1685fe5181e4868bca12ad06b220 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 16:08:27 +0200 Subject: [PATCH 02/16] Fix export of website. allowed_in_frames must be an int --- htdocs/website/class/website.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/website/class/website.class.php b/htdocs/website/class/website.class.php index 0805b1c4ed6..c7687b8101f 100644 --- a/htdocs/website/class/website.class.php +++ b/htdocs/website/class/website.class.php @@ -1086,7 +1086,7 @@ class Website extends CommonObject $line .= "'".$this->db->escape($stringtoexport)."', "; // Replace \r \n to have record on 1 line $line .= "'".$this->db->escape($objectpageold->author_alias)."', "; - $line .= "'".$this->db->escape($objectpageold->allowed_in_frames)."'"; + $line .= (int) $objectpageold->allowed_in_frames; $line .= ");"; $line .= "\n"; From 68234c4097fc9c08b8ed1d8ae2229c72b04b9561 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 16:40:33 +0200 Subject: [PATCH 03/16] Fix css z-index of dialog --- htdocs/theme/eldy/global.inc.php | 6 +++--- htdocs/theme/md/style.css.php | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index eff502190cb..1e37d372e86 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -4876,11 +4876,11 @@ div#card-errors { } .ui-dialog-content { } - -.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-dialog-buttons.ui-draggable { - z-index: 1002 !important; /* Default 101 with jquery, top menu have a z-index of 1000 */ +.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-draggable { + z-index: 1002 !important; /* Default 101 with ui-jquery, top menu have a z-index of 1000 */ } + /* ============================================================================== */ /* For content of image preview */ /* ============================================================================== */ diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 8a6c864fb17..bc201f7da68 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -4729,9 +4729,8 @@ div#card-errors { .ui-dialog-content { font-size: px !important; } - -.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-dialog-buttons.ui-draggable { - z-index: 1002 !important; /* Default 101 with jquery, top menu have a z-index of 1000 */ +.ui-dialog.ui-corner-all.ui-widget.ui-widget-content.ui-front.ui-draggable { + z-index: 1002 !important; /* Default 101 with ui-jquery, top menu have a z-index of 1000 */ } div#dialogforpopup { From 432468950b6244cdc2cebd64ecf0612b55f9fcc1 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 17:16:39 +0200 Subject: [PATCH 04/16] CSS --- htdocs/core/class/html.formwebsite.class.php | 5 +++-- htdocs/website/index.php | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index 083e571cf35..c6a6826251f 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -165,9 +165,10 @@ class FormWebsite * @param int $useempty 1=Add an empty value in list * @param string $moreattrib More attributes on HTML select tag * @param int $addjscombo Add js combo + * @param string $morecss More css * @return string HTML select component with list of type of containers */ - public function selectSampleOfContainer($htmlname, $selected = '', $useempty = 0, $moreattrib = '', $addjscombo = 0) + public function selectSampleOfContainer($htmlname, $selected = '', $useempty = 0, $moreattrib = '', $addjscombo = 0, $morecss = 'minwidth200') { global $langs, $conf, $user; @@ -190,7 +191,7 @@ class FormWebsite } $out = ''; - $out .= ''; if ($useempty == 1 || $useempty == 2) { $out .= ''; diff --git a/htdocs/website/index.php b/htdocs/website/index.php index bd571122392..4f8c79d91b1 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -3798,7 +3798,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties print ''; print $langs->trans('WEBSITE_PAGE_EXAMPLE'); print ''; - print $formwebsite->selectSampleOfContainer('sample', (GETPOSTISSET('sample') ? GETPOST('sample', 'alpha') : 'empty'), 0, '', 1); + print $formwebsite->selectSampleOfContainer('sample', (GETPOSTISSET('sample') ? GETPOST('sample', 'alpha') : 'empty'), 0, '', 1, 'minwidth300'); print ''; } @@ -3989,7 +3989,7 @@ if ($action == 'editmeta' || $action == 'createcontainer') { // Edit properties print ''; print $langs->trans('PublicAuthorAlias'); print ''; - print ''; + print ''; print ''; print ''; From 89999d0138227444b0b2a38bb67ccc90929c49d6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 17:31:30 +0200 Subject: [PATCH 05/16] Fix update description of skills --- htdocs/core/lib/functions.lib.php | 2 +- htdocs/core/menus/standard/eldy.lib.php | 2 +- htdocs/hrm/class/skill.class.php | 2 +- htdocs/hrm/skill_card.php | 6 +++--- htdocs/langs/en_US/hrm.lang | 3 ++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 868c41f5f36..316d4f79a6d 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3934,7 +3934,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'off', 'on', 'order', 'paiment', 'paragraph', 'play', 'pdf', 'phone', 'phoning', 'phoning_mobile', 'phoning_fax', 'playdisabled', 'previous', 'poll', 'pos', 'printer', 'product', 'propal', 'puce', 'stock', 'resize', 'service', 'stats', 'trip', - 'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench', + 'security', 'setup', 'share-alt', 'sign-out', 'split', 'stripe', 'stripe-s', 'switch_off', 'switch_on', 'switch_on_red', 'tools', 'unlink', 'uparrow', 'user', 'user-tie', 'vcard', 'wrench', 'github', 'google', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies', 'generic', 'home', 'hrm', 'members', 'products', 'invoicing', diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 9e88d4dda3d..44d99a9688d 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -2240,7 +2240,7 @@ function get_left_menu_hrm($mainmenu, &$newmenu, $usemenuhider = 1, $leftmenu = $newmenu->add("/user/card.php?mainmenu=hrm&leftmenu=hrm&action=create&employee=1", $langs->trans("NewEmployee"), 1, $user->rights->user->user->creer); $newmenu->add("/user/list.php?mainmenu=hrm&leftmenu=hrm&mode=employee&contextpage=employeelist", $langs->trans("List"), 1, $user->rights->user->user->lire); - $newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillsManagement"), 0, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'user', 'class="pictofixedwidth"')); + $newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("SkillsManagement"), 0, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="pictofixedwidth"')); // Skills $newmenu->add("/hrm/skill_list.php?mainmenu=hrm&leftmenu=hrm_sm", $langs->trans("Skills"), 1, $user->rights->hrm->all->read, '', $mainmenu, 'hrm_sm', 0, '', '', '', img_picto('', 'shapes', 'class="pictofixedwidth"')); diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index c2e8833955b..742578c4ad8 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -251,7 +251,7 @@ class Skill extends CommonObject global $conf, $user, $langs; $MaxNumberSkill = isset($conf->global->HRM_MAXRANK) ? $conf->global->HRM_MAXRANK : self::DEFAULT_MAX_RANK_PER_SKILL; - $defaultSkillDesc = !empty($conf->global->HRM_DEFAULT_SKILL_DESCRIPTION) ? $conf->global->HRM_DEFAULT_SKILL_DESCRIPTION : 'no Description'; + $defaultSkillDesc = !empty($conf->global->HRM_DEFAULT_SKILL_DESCRIPTION) ? $conf->global->HRM_DEFAULT_SKILL_DESCRIPTION : $langs->trans("NoDescription"); $error = 0; diff --git a/htdocs/hrm/skill_card.php b/htdocs/hrm/skill_card.php index 3a27d5898c0..9093766d3ed 100644 --- a/htdocs/hrm/skill_card.php +++ b/htdocs/hrm/skill_card.php @@ -123,11 +123,11 @@ if (empty($reshook)) { // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen - include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php'; + $noback = 1; + include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php'; // action update on Skilldet - - $skilldetArray = GETPOST("descriptionline", "array"); + $skilldetArray = GETPOST("descriptionline", "array:alphanohtml"); if (!$error) { if (is_array($skilldetArray) && count($skilldetArray) > 0) { diff --git a/htdocs/langs/en_US/hrm.lang b/htdocs/langs/en_US/hrm.lang index 1cac73d2394..cbd3dc91663 100644 --- a/htdocs/langs/en_US/hrm.lang +++ b/htdocs/langs/en_US/hrm.lang @@ -88,4 +88,5 @@ DeleteSkill = Skill removed SkillsExtraFields=Attributs supplémentaires (Compétences) JobsExtraFields=Attributs supplémentaires (Emplois) EvaluationsExtraFields=Attributs supplémentaires (Evaluations) -NeedBusinessTravels=Need business travels \ No newline at end of file +NeedBusinessTravels=Need business travels +NoDescription=No description \ No newline at end of file From 40ae516034759b8b31eee93bed418eb13152f89b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 17:37:02 +0200 Subject: [PATCH 06/16] Debug v16 --- htdocs/admin/hrm.php | 2 +- htdocs/hrm/class/skill.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/hrm.php b/htdocs/admin/hrm.php index f5bbb5c648f..b1b74189d35 100644 --- a/htdocs/admin/hrm.php +++ b/htdocs/admin/hrm.php @@ -57,7 +57,7 @@ $type = 'myobject'; $arrayofparameters = array( 'HRM_MAXRANK'=>array('type'=>'integer','enabled'=>1), - 'HRM_DEFAULT_SKILL_DESCRIPTION'=>array('type'=>'textarea','enabled'=>1), + 'HRM_DEFAULT_SKILL_DESCRIPTION'=>array('type'=>'varchar','enabled'=>1), ); $error = 0; diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 742578c4ad8..d9f4073e11e 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -76,7 +76,7 @@ class Skill extends CommonObject const STATUS_DRAFT = 0; const STATUS_VALIDATED = 1; const STATUS_CANCELED = 9; - const DEFAULT_MAX_RANK_PER_SKILL = 5; + const DEFAULT_MAX_RANK_PER_SKILL = 3; /** * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') From 394bfed965cfdd57152574da281e4f53e987d679 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 17:39:01 +0200 Subject: [PATCH 07/16] Debug v16 --- htdocs/core/modules/hrm/mod_evaluation_advanced.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index 0468c9ebb30..2e92e3dd473 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -81,7 +81,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation $texte .= ''.$langs->trans("Mask").':'; $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; - $texte .= '  '; + $texte .= '  '; $texte .= ''; From dd2901898772f092ff638d47538bdbc6de43f150 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 18:27:15 +0200 Subject: [PATCH 08/16] Fix bad table name --- .../mailing/class/advtargetemailing.class.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index 62dd24aaaf7..ea6ec241b16 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -41,7 +41,7 @@ class AdvanceTargetingMailing extends CommonObject /** * @var string Name of table without prefix where object is stored */ - public $table_element = 'advtargetemailing'; + public $table_element = 'mailing_advtarget'; /** * @var int ID @@ -159,7 +159,7 @@ class AdvanceTargetingMailing extends CommonObject // Put here code to add control on parameters values // Insert request - $sql = "INSERT INTO ".MAIN_DB_PREFIX."advtargetemailing("; + $sql = "INSERT INTO ".MAIN_DB_PREFIX."mailing_advtarget("; $sql .= "name,"; $sql .= "entity,"; $sql .= "fk_element,"; @@ -188,7 +188,7 @@ class AdvanceTargetingMailing extends CommonObject } if (!$error) { - $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."advtargetemailing"); + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."mailing_advtarget"); } // Commit or rollback @@ -227,7 +227,7 @@ class AdvanceTargetingMailing extends CommonObject $sql .= " t.fk_user_mod,"; $sql .= " t.tms"; - $sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t"; + $sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t"; $sql .= " WHERE t.rowid = ".((int) $id); dol_syslog(get_class($this)."::fetch", LOG_DEBUG); @@ -282,7 +282,7 @@ class AdvanceTargetingMailing extends CommonObject $sql .= " t.fk_user_mod,"; $sql .= " t.tms"; - $sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t"; + $sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t"; if (!empty($id)) { $sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = 'mailing'"; } else { @@ -345,7 +345,7 @@ class AdvanceTargetingMailing extends CommonObject $sql .= " t.fk_user_mod,"; $sql .= " t.tms"; - $sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as t"; + $sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as t"; if (!empty($id)) { $sql .= " WHERE t.fk_element = ".((int) $id)." AND type_element = '".$this->db->escape($type_element)."'"; } else { @@ -410,7 +410,7 @@ class AdvanceTargetingMailing extends CommonObject // Put here code to add a control on parameters values // Update request - $sql = "UPDATE ".MAIN_DB_PREFIX."advtargetemailing SET"; + $sql = "UPDATE ".MAIN_DB_PREFIX."mailing_advtarget SET"; $sql .= " name=".(isset($this->name) ? "'".$this->db->escape($this->name)."'" : "''").","; $sql .= " entity=".$conf->entity.","; @@ -458,7 +458,7 @@ class AdvanceTargetingMailing extends CommonObject $this->db->begin(); if (!$error) { - $sql = "DELETE FROM ".MAIN_DB_PREFIX."advtargetemailing"; + $sql = "DELETE FROM ".MAIN_DB_PREFIX."mailing_advtarget"; $sql .= " WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::delete sql=".$sql); From fe7346a9c6a34645cf391320fc7a00c691f8e79e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 18:30:18 +0200 Subject: [PATCH 09/16] Hide var not usefull and dangerous --- htdocs/admin/security_other.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index 8b446b1eb1b..79190725c16 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -61,8 +61,13 @@ if (preg_match('/set_([a-z0-9_\-]+)/i', $action, $reg)) { dol_print_error($db); } } elseif ($action == 'updateform') { - $res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); - $res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + $res1 = 1; $res2 = 1; + if (GETPOSTISSET('MAIN_APPLICATION_TITLE')) { + $res1 = dolibarr_set_const($db, "MAIN_APPLICATION_TITLE", GETPOST("MAIN_APPLICATION_TITLE", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + } + if (GETPOSTISSET('MAIN_SESSION_TIMEOUT')) { + $res2 = dolibarr_set_const($db, "MAIN_SESSION_TIMEOUT", GETPOST("MAIN_SESSION_TIMEOUT", 'alphanohtml'), 'chaine', 0, '', $conf->entity); + } if ($res1 && $res2) { setEventMessages($langs->trans("RecordModifiedSuccessfully"), null, 'mesgs'); } @@ -165,11 +170,11 @@ if (ini_get("session.gc_probability") == 0) { } print ''; print ''; -print ' '.strtolower($langs->trans("Seconds")); +print ' '.strtolower($langs->trans("Seconds")); print ''; print ''; - +/* if (empty($conf->global->MAIN_APPLICATION_TITLE)) { $conf->global->MAIN_APPLICATION_TITLE = ""; } @@ -180,6 +185,7 @@ print ''; print ' '; print ''; print ''; +*/ print ''; From e465c0f34b56fe8bc05e1423acb066e49ab5e5c6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 24 Jul 2022 18:59:07 +0200 Subject: [PATCH 10/16] Debug v16 --- htdocs/adherents/admin/website.php | 14 +++++++------- htdocs/adherents/card.php | 13 +++++++------ htdocs/adherents/subscription/list.php | 6 +++++- htdocs/admin/bom.php | 6 +++--- htdocs/admin/commande.php | 6 +++--- htdocs/admin/contract.php | 2 +- htdocs/admin/expedition.php | 2 +- htdocs/admin/expensereport.php | 2 +- htdocs/admin/facture.php | 2 +- htdocs/admin/fichinter.php | 2 +- htdocs/admin/holiday.php | 2 +- htdocs/admin/mrp.php | 2 +- htdocs/admin/propal.php | 2 +- htdocs/admin/reception_setup.php | 2 +- htdocs/admin/supplier_proposal.php | 2 +- htdocs/core/modules/asset/mod_asset_advanced.php | 4 ++-- htdocs/core/modules/bom/mod_bom_advanced.php | 4 ++-- .../core/modules/hrm/mod_evaluation_advanced.php | 4 ++-- .../member/doc/doc_generic_member_odt.class.php | 4 ++-- htdocs/core/modules/mrp/mod_mo_advanced.php | 4 ++-- .../modules/product_batch/mod_lot_advanced.php | 4 ++-- .../core/modules/product_batch/mod_sn_advanced.php | 4 ++-- .../stocktransfer/mod_stocktransfer_advanced.php | 4 ++-- .../workstation/mod_workstation_advanced.php | 4 ++-- .../mod_knowledgerecord_advanced.php | 4 ++-- .../mymodule/doc/pdf_standard_myobject.modules.php | 4 ++-- .../modules/mymodule/mod_myobject_advanced.php | 4 ++-- .../partnership/mod_partnership_advanced.php | 4 ++-- htdocs/product/card.php | 6 +++--- ...pdf_standard_recruitmentjobposition.modules.php | 4 ++-- 30 files changed, 66 insertions(+), 61 deletions(-) diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index 6199991f29c..884c6e67be2 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -178,14 +178,14 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { print ''; print ''.$langs->trans("Parameter").''; - print ''.$langs->trans("Value").''; + print ''.$langs->trans("Value").''; print "\n"; // Force Type $adht = new AdherentType($db); print ''; print $langs->trans("ForceMemberType"); - print ''; + print ''; $listofval = array(); $listofval += $adht->liste_array(1); $forcetype = empty($conf->global->MEMBER_NEWFORM_FORCETYPE) ? -1 : $conf->global->MEMBER_NEWFORM_FORCETYPE; @@ -197,7 +197,7 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { $morphys["mor"] = $langs->trans("Moral"); print ''; print $langs->trans("ForceMemberNature"); - print ''; + print ''; $forcenature = empty($conf->global->MEMBER_NEWFORM_FORCEMORPHY) ? 0 : $conf->global->MEMBER_NEWFORM_FORCEMORPHY; print $form->selectarray("MEMBER_NEWFORM_FORCEMORPHY", $morphys, $forcenature, 1); print "\n"; @@ -205,21 +205,21 @@ if (!empty($conf->global->MEMBER_ENABLE_PUBLIC)) { // Amount print ''; print $langs->trans("DefaultAmount"); - print ''; - print ''; + print ''; + print ''; print "\n"; // Can edit print ''; print $langs->trans("CanEditAmount"); - print ''; + print ''; print $form->selectyesno("MEMBER_NEWFORM_EDITAMOUNT", (!empty($conf->global->MEMBER_NEWFORM_EDITAMOUNT) ? $conf->global->MEMBER_NEWFORM_EDITAMOUNT : 0), 1); print "\n"; // Jump to an online payment page print ''; print $langs->trans("MEMBER_NEWFORM_PAYONLINE"); - print ''; + print ''; $listofval = array(); $listofval['-1'] = $langs->trans('No'); $listofval['all'] = $langs->trans('Yes').' ('.$langs->trans("VisitorCanChooseItsPaymentMode").')'; diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index 70b86338db8..aef5789549e 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -1226,12 +1226,6 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) { print ''.$langs->trans("Password").'pass).'">'; } - // Morphy - $morphys["phy"] = $langs->trans("Physical"); - $morphys["mor"] = $langs->trans("Moral"); - print ''.$langs->trans("MemberNature").''; - print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ? GETPOST("morphy", 'alpha') : $object->morphy), 0, 0, 0, '', 0, 0, 0, '', '', 1); - print ""; // Type print ''.$langs->trans("Type").''; @@ -1243,6 +1237,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } print ""; + // Morphy + $morphys["phy"] = $langs->trans("Physical"); + $morphys["mor"] = $langs->trans("Moral"); + print ''.$langs->trans("MemberNature").''; + print $form->selectarray("morphy", $morphys, (GETPOSTISSET("morphy") ? GETPOST("morphy", 'alpha') : $object->morphy), 0, 0, 0, '', 0, 0, 0, '', '', 1); + print ""; + // Company print ''.$langs->trans("Company").'company).'">'; diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 6056e1320f0..3fa4c4b3e7f 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -598,7 +598,11 @@ while ($i < min($num, $limit)) { if (!$i) { $totalarray['pos'][$totalarray['nbfield']] = 'd.amount'; } - $totalarray['val']['d.amount'] += $obj->subscription; + if (empty($totalarray['val']['d.amount'])) { + $totalarray['val']['d.amount'] = $obj->subscription; + } else { + $totalarray['val']['d.amount'] += $obj->subscription; + } } // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php'; diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index 459d9c47227..b19db5a3d5e 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -466,13 +466,13 @@ print ''; //Use draft Watermark -print "
"; +print ''; print ''; -print ""; +print ''; print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; -print ''; +print ''; print ''; print ''; print "\n"; diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 1369c5667a8..a2aa663f189 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -625,13 +625,13 @@ print '
'; //Use draft Watermark -print "
"; +print ''; print ''; -print ""; +print ''; print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftOrders"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; -print ''; +print ''; print ''; print ''; print "\n"; diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index e8a1fc85790..a2db7bf8fcf 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -458,7 +458,7 @@ print ''."\n"; print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; -print ''; +print ''; print ''."\n"; print ''; diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index cb49404a8b9..0a9009889f8 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -451,7 +451,7 @@ print "\n"; print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; -print ''; +print ''; print "\n"; print ''; diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 0c54eade6da..64cf24ca6fa 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -468,7 +468,7 @@ print ''."\n"; print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftExpenseReports"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; -print ''; +print ''; print ''."\n"; if (!empty($conf->project->enabled)) { diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index accb3d850a0..f866eef7802 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -761,7 +761,7 @@ print ' print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftBill"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; -print ''; +print ''; print ''; print ''; print "\n"; diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 36a55be9a95..79896d0ed74 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -525,7 +525,7 @@ print "'; print $form->textwithpicto($langs->trans("WatermarkOnDraftInterventionCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; -print ''; +print ''; print ''; print ''; print "\n"; diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index f208e2a658a..c3c58984dc0 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -551,7 +551,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftHolidayCards"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; - print ''; + print ''; print ''."\n"; } diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index f4283373b95..2d543cb1faa 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -465,7 +465,7 @@ print "'; print $form->textwithpicto($langs->trans("WatermarkOnDraftMOs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; -print ''; +print ''; print ''; print ''; print "\n"; diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index fe8db9818f7..c324f33ba92 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -693,7 +693,7 @@ print "'; print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; -print ''; +print ''; print ''; print ''; print "\n"; diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index 1ca874c69b5..5479b43f6ca 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -467,7 +467,7 @@ print "\n"; print ''; print $form->textwithpicto($langs->trans("WatermarkOnDraftContractCards"), $htmltext).'
'; -print ''; +print ''; print "\n"; */ print ''; diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index bb0617c6700..76a881f9415 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -492,7 +492,7 @@ print "'; print $form->textwithpicto($langs->trans("WatermarkOnDraftProposal"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'
'; print ''; -print ''; +print ''; print ''; print ''; print "\n"; diff --git a/htdocs/core/modules/asset/mod_asset_advanced.php b/htdocs/core/modules/asset/mod_asset_advanced.php index 0942604466c..34780c3423f 100644 --- a/htdocs/core/modules/asset/mod_asset_advanced.php +++ b/htdocs/core/modules/asset/mod_asset_advanced.php @@ -78,7 +78,7 @@ class mod_asset_advanced extends ModeleNumRefAsset // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -131,7 +131,7 @@ class mod_asset_advanced extends ModeleNumRefAsset require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->ASSET_ASSET_ADVANCED_MASK; + $mask = getDolGlobalString('ASSET_ASSET_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/bom/mod_bom_advanced.php b/htdocs/core/modules/bom/mod_bom_advanced.php index 09faf05d7d6..2228d643434 100644 --- a/htdocs/core/modules/bom/mod_bom_advanced.php +++ b/htdocs/core/modules/bom/mod_bom_advanced.php @@ -79,7 +79,7 @@ class mod_bom_advanced extends ModeleNumRefboms // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -128,7 +128,7 @@ class mod_bom_advanced extends ModeleNumRefboms require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->BOM_ADVANCED_MASK; + $mask = getDolGlobalString('BOM_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/hrm/mod_evaluation_advanced.php b/htdocs/core/modules/hrm/mod_evaluation_advanced.php index 2e92e3dd473..cdb1cc20109 100644 --- a/htdocs/core/modules/hrm/mod_evaluation_advanced.php +++ b/htdocs/core/modules/hrm/mod_evaluation_advanced.php @@ -79,7 +79,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -132,7 +132,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->HRM_EVALUATION_ADVANCED_MASK; + $mask = getDolGlobalString('HRM_EVALUATION_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; 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 0b64203798f..c2ccff58ed7 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 @@ -125,7 +125,7 @@ class doc_generic_member_odt extends ModelePDFMember // List of directories area $texte .= ''; $texttitle = $langs->trans("ListOfDirectories"); - $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim($conf->global->MEMBER_ADDON_PDF_ODT_PATH))); + $listofdir = explode(',', preg_replace('/[\r\n]+/', ',', trim(getDolGlobalString('MEMBER_ADDON_PDF_ODT_PATH')))); $listoffiles = array(); foreach ($listofdir as $key => $tmpdir) { $tmpdir = trim($tmpdir); @@ -151,7 +151,7 @@ class doc_generic_member_odt extends ModelePDFMember $texte .= $form->textwithpicto($texttitle, $texthelp, 1, 'help', '', 1); $texte .= '
'; $texte .= ''; $texte .= '
'; $texte .= ''; diff --git a/htdocs/core/modules/mrp/mod_mo_advanced.php b/htdocs/core/modules/mrp/mod_mo_advanced.php index ba518159dbf..5588d1cae16 100644 --- a/htdocs/core/modules/mrp/mod_mo_advanced.php +++ b/htdocs/core/modules/mrp/mod_mo_advanced.php @@ -80,7 +80,7 @@ class mod_mo_advanced extends ModeleNumRefMos // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -129,7 +129,7 @@ class mod_mo_advanced extends ModeleNumRefMos require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->MRP_MO_ADVANCED_MASK; + $mask = getDolGlobalString('MRP_MO_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/product_batch/mod_lot_advanced.php b/htdocs/core/modules/product_batch/mod_lot_advanced.php index 0865ebc9a66..0e108b6b021 100644 --- a/htdocs/core/modules/product_batch/mod_lot_advanced.php +++ b/htdocs/core/modules/product_batch/mod_lot_advanced.php @@ -66,7 +66,7 @@ class mod_lot_advanced extends ModeleNumRefBatch $form = new Form($db); // We get cursor rule - $mask = isset($conf->global->LOT_ADVANCED_MASK) ? $conf->global->LOT_ADVANCED_MASK : ''; + $mask = getDolGlobalString('LOT_ADVANCED_MASK'); $texte = $langs->trans('GenericNumRefModelDesc')."
\n"; $texte .= ''; @@ -142,7 +142,7 @@ class mod_lot_advanced extends ModeleNumRefBatch require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = isset($conf->global->LOT_ADVANCED_MASK) ? $conf->global->LOT_ADVANCED_MASK : ''; + $mask = getDolGlobalString('LOT_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/product_batch/mod_sn_advanced.php b/htdocs/core/modules/product_batch/mod_sn_advanced.php index 46f803cb20f..f8d61c43c61 100644 --- a/htdocs/core/modules/product_batch/mod_sn_advanced.php +++ b/htdocs/core/modules/product_batch/mod_sn_advanced.php @@ -66,7 +66,7 @@ class mod_sn_advanced extends ModeleNumRefBatch $form = new Form($db); // We get cursor rule - $mask = isset($conf->global->SN_ADVANCED_MASK) ? $conf->global->SN_ADVANCED_MASK : ''; + $mask = getDolGlobalString('SN_ADVANCED_MASK'); $texte = $langs->trans('GenericNumRefModelDesc')."
\n"; $texte .= ''; @@ -142,7 +142,7 @@ class mod_sn_advanced extends ModeleNumRefBatch require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = isset($conf->global->SN_ADVANCED_MASK) ? $conf->global->SN_ADVANCED_MASK : ''; + $mask = getDolGlobalString('SN_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php index fab0952e894..dd29e48d0b8 100644 --- a/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php +++ b/htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php @@ -80,7 +80,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -133,7 +133,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK; + $mask = getDolGlobalString('STOCKTRANSFER_STOCKTRANSFER_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/core/modules/workstation/mod_workstation_advanced.php b/htdocs/core/modules/workstation/mod_workstation_advanced.php index 6611f8d926e..125aa0f7c53 100644 --- a/htdocs/core/modules/workstation/mod_workstation_advanced.php +++ b/htdocs/core/modules/workstation/mod_workstation_advanced.php @@ -80,7 +80,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -133,7 +133,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->WORKSTATION_WORKSTATION_ADVANCED_MASK; + $mask = getDolGlobalString('WORKSTATION_WORKSTATION_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php index 8cdbee53395..ba0cf9818dc 100644 --- a/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php +++ b/htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php @@ -79,7 +79,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -132,7 +132,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK; + $mask = getDolGlobalString('KNOWLEDGEMANAGEMENT_KNOWLEDGERECORD_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index 561a705dc4b..561c09f88d6 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -898,8 +898,8 @@ class pdf_standard_myobject extends ModelePDFMyObject pdf_pagehead($pdf, $outputlangs, $this->page_hauteur); // Show Draft Watermark - if ($object->statut == $object::STATUS_DRAFT && (!empty($conf->global->FACTURE_DRAFT_WATERMARK))) { - pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FACTURE_DRAFT_WATERMARK); + if ($object->statut == $object::STATUS_DRAFT && getDolGlobalString('MYMODULE_DRAFT_WATERMARK')) { + pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', dol_escape_htmltag(getDolGlobalString('MYMODULE_DRAFT_WATERMARK'))); } $pdf->SetTextColor(0, 0, 60); diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php index 0573edc6b2a..61186a3b4f3 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php @@ -79,7 +79,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; $texte .= ''; @@ -130,7 +130,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->MYMODULE_MYOBJECT_ADVANCED_MASK; + $mask = getDolGlobalString('MYMODULE_MYOBJECT_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php index 5d348843941..d717bdc49bf 100644 --- a/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php +++ b/htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php @@ -79,7 +79,7 @@ class mod_partnership_advanced extends ModeleNumRefPartnership // Parametrage du prefix $texte .= ''.$langs->trans("Mask").':'; - $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; + $texte .= ''.$form->textwithpicto('', $tooltip, 1, 1).''; $texte .= '  '; @@ -132,7 +132,7 @@ class mod_partnership_advanced extends ModeleNumRefPartnership require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; // We get cursor rule - $mask = $conf->global->PARTNERSHIP_ADVANCED_MASK; + $mask = getDolGlobalString('PARTNERSHIP_ADVANCED_MASK'); if (!$mask) { $this->error = 'NotConfigured'; diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 664b25ff169..03e91b49e4b 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1343,8 +1343,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { if ((!empty($conf->global->PRODUCTBATCH_LOT_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_LOT_ADDON == 'mod_lot_advanced') || (!empty($conf->global->PRODUCTBATCH_SN_USE_PRODUCT_MASKS) && $conf->global->PRODUCTBATCH_SN_ADDON == 'mod_sn_advanced')) { print ''.$langs->trans("ManageLotMask").''; - $inherited_mask_lot = $conf->global->LOT_ADVANCED_MASK; - $inherited_mask_sn = $conf->global->SN_ADVANCED_MASK; + $inherited_mask_lot = getDolGlobalString('LOT_ADVANCED_MASK'); + $inherited_mask_sn = getDolGlobalString('SN_ADVANCED_MASK'); print ''; print $form->textwithpicto('', $tooltip, 1, 1); print '