From 071b6a1bdc8d175a331af1d90c7248db8c059f95 Mon Sep 17 00:00:00 2001 From: daraelmin Date: Thu, 18 Mar 2021 23:11:19 +0100 Subject: [PATCH 01/39] Code translation --- htdocs/adherents/index.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 4a4724593e4..33afa113078 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -193,11 +193,11 @@ if ($conf->use_javascript_ajax) { $boxgraph .=''.$langs->trans("Statistics").''; $boxgraph .=''; - $SommeA = 0; - $SommeB = 0; + $SumToValidate = 0; + $SumValidated = 0; - $SommeC = 0; - $SommeD = 0; + $SumUpToDate = 0; + $SumResiliated = 0; $total = 0; $dataval = array(); $i = 0; @@ -206,18 +206,18 @@ if ($conf->use_javascript_ajax) { $dataval['notuptodate'][] = array($i, isset($MembersValidated[$key]) ? $MembersValidated[$key] - (isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0) : 0); $dataval['uptodate'][] = array($i, isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0); $dataval['resiliated'][] = array($i, isset($MembersResiliated[$key]) ? $MembersResiliated[$key] : 0); - $SommeA += isset($MembersToValidate[$key]) ? $MembersToValidate[$key] : 0; - $SommeB += isset($MembersValidated[$key]) ? $MembersValidated[$key] - (isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0) : 0; - $SommeC += isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0; - $SommeD += isset($MembersResiliated[$key]) ? $MembersResiliated[$key] : 0; + $SumToValidate += isset($MembersToValidate[$key]) ? $MembersToValidate[$key] : 0; + $SumValidated += isset($MembersValidated[$key]) ? $MembersValidated[$key] - (isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0) : 0; + $SumUpToDate += isset($MembersUpToDate[$key]) ? $MembersUpToDate[$key] : 0; + $SumResiliated += isset($MembersResiliated[$key]) ? $MembersResiliated[$key] : 0; $i++; } - $total = $SommeA + $SommeB + $SommeC + $SommeD; + $total = $SumToValidate + $SumValidated + $SumUpToDate + $SumResiliated; $dataseries = array(); - $dataseries[] = array($langs->transnoentitiesnoconv("OutOfDate"), round($SommeB)); - $dataseries[] = array($langs->transnoentitiesnoconv("UpToDate"), round($SommeC)); - $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), round($SommeD)); - $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), round($SommeA)); + $dataseries[] = array($langs->transnoentitiesnoconv("OutOfDate"), round($SumValidated)); + $dataseries[] = array($langs->transnoentitiesnoconv("UpToDate"), round($SumUpToDate)); + $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusResiliated"), round($SumResiliated)); + $dataseries[] = array($langs->transnoentitiesnoconv("MembersStatusToValid"), round($SumToValidate)); include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; @@ -234,7 +234,7 @@ if ($conf->use_javascript_ajax) { $boxgraph .= ''; $boxgraph .= ''.$langs->trans("Total").''; - $boxgraph .= $SommeA + $SommeB + $SommeC + $SommeD; + $boxgraph .= $SumToValidate + $SumValidated + $SumUpToDate + $SumResiliated; $boxgraph .= ''; $boxgraph .= ''; $boxgraph .= ''; @@ -484,10 +484,10 @@ foreach ($AdherentType as $key => $adhtype) { } print ''; print ''.$langs->trans("Total").''; -print ''.$SommeA.' '.$staticmember->LibStatut(-1, $adhtype->subscription, 0, 3).''; -print ''.$SommeB.' '.$staticmember->LibStatut(1, $adhtype->subscription, 0, 3).''; -print ''.$SommeC.' '.$staticmember->LibStatut(1, $adhtype->subscription, $now, 3).''; -print ''.$SommeD.' '.$staticmember->LibStatut(0, $adhtype->subscription, 0, 3).''; +print ''.$SumToValidate.' '.$staticmember->LibStatut(-1, $adhtype->subscription, 0, 3).''; +print ''.$SumValidated.' '.$staticmember->LibStatut(1, $adhtype->subscription, 0, 3).''; +print ''.$SumUpToDate.' '.$staticmember->LibStatut(1, $adhtype->subscription, $now, 3).''; +print ''.$SumResiliated.' '.$staticmember->LibStatut(0, $adhtype->subscription, 0, 3).''; print ''; print "\n"; From 6cf970df8edb670346309e92130346317729a0e4 Mon Sep 17 00:00:00 2001 From: Chl Date: Fri, 19 Mar 2021 02:42:47 +0100 Subject: [PATCH 02/39] FIX #16143 Old PG requires "()" on DROP FUNCTION On PostgreSQL 9.6 and previous, the upgrade script fails with a syntax error if the dropped function's name is not followed by parentheses. Patch tested on 9.6 and 13.2. --- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index abbeadf7166..e69cad3564c 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -579,7 +579,7 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('EXPENSE_REPORT_DELETE','Expense report deleted','Executed when an expense report is deleted','expensereport',205); -- Removed no more used function --- VPGSQL8.2 DROP FUNCTION IF EXISTS update_modified_column_date_m CASCADE; +-- VPGSQL8.2 DROP FUNCTION IF EXISTS update_modified_column_date_m() CASCADE; insert into llx_c_actioncomm (id, code, type, libelle, module, active, position) values ( 6,'AC_EMAIL_IN','system','reception Email',NULL, 1, 4); From 6713d9b099bcacbb98d9e08af7bd3c52e2904ad2 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:05:49 +0100 Subject: [PATCH 03/39] Update fiscalyear.php $help_url = "EN:Module_Double_Entry_Accounting"; llxHeader('', $title, $help_url); --- htdocs/accountancy/admin/fiscalyear.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/fiscalyear.php b/htdocs/accountancy/admin/fiscalyear.php index ac8a8c6354d..4338d7ad803 100644 --- a/htdocs/accountancy/admin/fiscalyear.php +++ b/htdocs/accountancy/admin/fiscalyear.php @@ -91,8 +91,10 @@ $form = new Form($db); $fiscalyearstatic = new Fiscalyear($db); $title = $langs->trans('AccountingPeriods'); -$helpurl = ""; -llxHeader('', $title, $helpurl); + +$help_url = "EN:Module_Double_Entry_Accounting"; + +llxHeader('', $title, $help_url); $sql = "SELECT f.rowid, f.label, f.date_start, f.date_end, f.statut, f.entity"; $sql .= " FROM ".MAIN_DB_PREFIX."accounting_fiscalyear as f"; From 19f7b10e4f41dfb8c1ba59494809f699a9fe5068 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:07:27 +0100 Subject: [PATCH 04/39] Update fiscalyear_card.php $help_url = "EN:Module_Double_Entry_Accounting"; llxHeader('', $title, $help_url); --- htdocs/accountancy/admin/fiscalyear_card.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/fiscalyear_card.php b/htdocs/accountancy/admin/fiscalyear_card.php index 7fdd7c19e32..410807144f5 100644 --- a/htdocs/accountancy/admin/fiscalyear_card.php +++ b/htdocs/accountancy/admin/fiscalyear_card.php @@ -149,8 +149,10 @@ if ($action == 'confirm_delete' && $confirm == "yes") { $form = new Form($db); $title = $langs->trans("Fiscalyear")." - ".$langs->trans("Card"); -$helpurl = ""; -llxHeader("", $title, $helpurl); + +$help_url = "EN:Module_Double_Entry_Accounting"; + +llxHeader('', $title, $help_url); if ($action == 'create') { print load_fiche_titre($langs->trans("NewFiscalYear")); From a0feed25179d7f5beb3af3c974fb1f583b714ae8 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:08:55 +0100 Subject: [PATCH 05/39] Update fiscalyear_info.php $help_url = "EN:Module_Double_Entry_Accounting"; llxHeader('', $title, $help_url); --- htdocs/accountancy/admin/fiscalyear_info.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/accountancy/admin/fiscalyear_info.php b/htdocs/accountancy/admin/fiscalyear_info.php index 6fc5ac3cad8..d472350fab7 100644 --- a/htdocs/accountancy/admin/fiscalyear_info.php +++ b/htdocs/accountancy/admin/fiscalyear_info.php @@ -39,10 +39,14 @@ if (!$user->rights->accounting->fiscalyear->write) { $id = GETPOST('id', 'int'); + // View + $title = $langs->trans("Fiscalyear")." - ".$langs->trans("Info"); -$helpurl = ""; -llxHeader("", $title, $helpurl); + +$help_url = "EN:Module_Double_Entry_Accounting"; + +llxHeader('', $title, $help_url); if ($id) { $object = new Fiscalyear($db); From d76bd583f5701f147cf0a77689fcc68078f8e31f Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:13:06 +0100 Subject: [PATCH 06/39] Update agenda.php $help_url = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder"; llxHeader("", $title, $help_url); --- htdocs/adherents/agenda.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index edb2e9ba4dc..b123432166d 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -122,8 +122,10 @@ if ($object->id > 0) { $langs->load("companies"); $title = $langs->trans("Member")." - ".$langs->trans("Agenda"); - $helpurl = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros"; - llxHeader("", $title, $helpurl); + + $help_url = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder"; + + llxHeader("", $title, $help_url); if (!empty($conf->notification->enabled)) { $langs->load("mails"); From e5eddff0a5bec929a6e9bbf9d128950a6159c869 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 19 Mar 2021 08:15:14 +0000 Subject: [PATCH 07/39] Fixing style errors. --- htdocs/adherents/agenda.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index b123432166d..3f7114380f3 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -122,9 +122,9 @@ if ($object->id > 0) { $langs->load("companies"); $title = $langs->trans("Member")." - ".$langs->trans("Agenda"); - + $help_url = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder"; - + llxHeader("", $title, $help_url); if (!empty($conf->notification->enabled)) { From 7183bfeb940878e64eafc4e8262c40f1de4db134 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 09:15:35 +0100 Subject: [PATCH 08/39] fix new boxes add --- htdocs/core/boxes/box_members_last_modified.php | 6 +++--- htdocs/core/boxes/box_members_last_subscriptions.php | 6 +++--- htdocs/core/modules/modAdherent.class.php | 8 ++++---- htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 5 +++++ 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/htdocs/core/boxes/box_members_last_modified.php b/htdocs/core/boxes/box_members_last_modified.php index 9ec1bf70558..1315ac9895b 100644 --- a/htdocs/core/boxes/box_members_last_modified.php +++ b/htdocs/core/boxes/box_members_last_modified.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/core/boxes/box_last_modified_members.php + * \file htdocs/core/boxes/box_members_last_modified.php * \ingroup adherent * \brief Module to show box of members */ @@ -30,9 +30,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; /** * Class to manage the box to show last modofied members */ -class box_last_modified_members extends ModeleBoxes +class box_members_last_modified extends ModeleBoxes { - public $boxcode = "box_last_modified_members"; + public $boxcode = "box_members_last_modified"; public $boximg = "object_user"; public $boxlabel = "BoxLastModifiedMembers"; public $depends = array("adherent"); diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php index 0b2cb02d920..6da20bf28d0 100644 --- a/htdocs/core/boxes/box_members_last_subscriptions.php +++ b/htdocs/core/boxes/box_members_last_subscriptions.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/core/boxes/box_last_members_subscriptions.php + * \file htdocs/core/boxes/box_members_last_subscriptions.php * \ingroup adherent * \brief Module to show box of members */ @@ -30,9 +30,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; /** * Class to manage the box to show last modofied members */ -class box_last_members_subscriptions extends ModeleBoxes +class box_members_last_subscriptions extends ModeleBoxes { - public $boxcode = "box_last_members_subscriptions"; + public $boxcode = "box_members_last_subscriptions"; public $boximg = "object_user"; public $boxlabel = "BoxLastMembersSubscriptions"; public $depends = array("adherent"); diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 74c67d217d6..57ec76e319d 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -194,10 +194,10 @@ class modAdherent extends DolibarrModules $this->boxes = array( 0 => array('file'=>'box_members.php', 'enabledbydefaulton'=>'Home'), 2 => array('file'=>'box_birthdays_members.php', 'enabledbydefaulton'=>'Home'), - 3 => array('file'=>'box_members_last_modified', 'enabledbydefaulton'=>'membersindex'), - 4 => array('file'=>'box_members_last_subscriptions', 'enabledbydefaulton'=>'membersindex'), - 5 => array('file'=>'box_members_subscriptions_by_year', 'enabledbydefaulton'=>'membersindex'), - 6 => array('file'=>'box_members_by_type', 'enabledbydefaulton'=>'membersindex'), + 3 => array('file'=>'box_members_last_modified.php', 'enabledbydefaulton'=>'membersindex'), + 4 => array('file'=>'box_members_last_subscriptions.php', 'enabledbydefaulton'=>'membersindex'), + 5 => array('file'=>'box_members_subscriptions_by_year.php', 'enabledbydefaulton'=>'membersindex'), + 6 => array('file'=>'box_members_by_type.php', 'enabledbydefaulton'=>'membersindex'), ); // Permissions diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index 2e60f214c77..0f1706f011e 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -77,6 +77,11 @@ ALTER TABLE llx_facture MODIFY COLUMN date_valid DATETIME NULL DEFAULT NULL; -- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_dolibarr_state_board.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_dolibarr_state_board.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_last_modified.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_last_modified.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_last_subscriptions.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_last_subscriptions.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_subscriptions_by_year.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_subscriptions_by_year.php' AND entity = 1); +-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_by_type.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_by_type.php' AND entity = 1); + ALTER TABLE llx_website ADD COLUMN lastaccess datetime NULL; ALTER TABLE llx_website ADD COLUMN pageviews_month BIGINT UNSIGNED DEFAULT 0; From b17c5b50cdad1e86aca818f0a53bd024315304c0 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:15:48 +0100 Subject: [PATCH 09/39] Update note.php $help_url = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder"; llxHeader("", $title, $help_url); --- htdocs/adherents/note.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 437a8c0c577..26fec04a5e6 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -57,9 +57,12 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, /* * View */ + $title = $langs->trans("Member")." - ".$langs->trans("Note"); -$helpurl = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros"; -llxHeader("", $title, $helpurl); + +$help_url = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder"; + +llxHeader("", $title, $help_url); $form = new Form($db); From c0a420bcb7ed021bc1ce72d22b39875b9be51642 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:17:24 +0100 Subject: [PATCH 10/39] Update subscription.php $help_url = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder"; llxHeader("", $title, $help_url); --- htdocs/adherents/subscription.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 79f1a4da036..5862b807671 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -428,8 +428,10 @@ $form = new Form($db); $now = dol_now(); $title = $langs->trans("Member")." - ".$langs->trans("Subscriptions"); -$helpurl = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros"; -llxHeader("", $title, $helpurl); + +$help_url = "EN:Module_Foundations|FR:Module_Adhérents|ES:Módulo_Miembros|DE:Modul_Mitglieder"; + +llxHeader("", $title, $help_url); $param = ''; From 74de2722365869ab52bcaa239bb56ff55f2721ea Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:19:28 +0100 Subject: [PATCH 11/39] Update type_translation.php $help_url = ''; .... $help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Mitglieder'; llxHeader('', $title, $help_url); --- htdocs/adherents/type_translation.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php index 0ce4b2314b4..a99f1f990ad 100644 --- a/htdocs/adherents/type_translation.php +++ b/htdocs/adherents/type_translation.php @@ -142,13 +142,16 @@ $result = $object->fetch($id); */ $title = $langs->trans('MemberTypeCard'); -$helpurl = ''; + +$help_url = ''; + $shortlabel = dol_trunc($object->label, 16); $title = $langs->trans('MemberType')." ".$shortlabel." - ".$langs->trans('Translation'); -$helpurl = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; -llxHeader('', $title, $helpurl); +$help_url = 'EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios|DE:Modul_Mitglieder'; + +llxHeader('', $title, $help_url); $form = new Form($db); $formadmin = new FormAdmin($db); From 01e4f4bff5d6824f8a652bc0514d1a5ee224853f Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:20:43 +0100 Subject: [PATCH 12/39] Update document.php $help_url = ''; llxHeader('', $title, $help_url); --- htdocs/asset/document.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php index e5db1465fb6..ce8adad8e34 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -82,8 +82,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; */ $title = $langs->trans('Assets')." - ".$langs->trans('Documents'); -$helpurl = ''; -llxHeader('', $title, $helpurl); + +$help_url = ''; + +llxHeader('', $title, $help_url); $form = new Form($db); From 8c59ad974b0df27deb9beefe0b5bfc83f25f638d Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:22:58 +0100 Subject: [PATCH 13/39] Update info.php $help_url = ""; llxHeader('', $title, $help_url); --- htdocs/asset/info.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/asset/info.php b/htdocs/asset/info.php index f6d34454ad4..7a8f4c20ce2 100644 --- a/htdocs/asset/info.php +++ b/htdocs/asset/info.php @@ -57,8 +57,10 @@ $object->fetch($id); $form = new Form($db); $title = $langs->trans('Asset')." - ".$langs->trans('Info'); -$helpurl = ""; -llxHeader('', $title, $helpurl); + +$help_url = ""; + +llxHeader('', $title, $help_url); $object->info($id); From 21963dbc656a06edcbe2b8373dfadd6b1750606a Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:23:57 +0100 Subject: [PATCH 14/39] Update type.php $help_url = ''; llxHeader('', $langs->trans("AssetsTypeSetup"), $help_url); --- htdocs/asset/type.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 9d7e848b6d3..6103b963e21 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -196,8 +196,9 @@ if ($action == 'confirm_delete' && $user->rights->asset->write) { $form = new Form($db); -$helpurl = ''; -llxHeader('', $langs->trans("AssetsTypeSetup"), $helpurl); +$help_url = ''; + +llxHeader('', $langs->trans("AssetsTypeSetup"), $help_url); // List of asset type From 31e018636d22d22e1e449e41298f4a8ea4e325b7 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:25:47 +0100 Subject: [PATCH 15/39] Update card.php MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $help_url = 'EN:Module_Categories|FR:Module_Catégories|DE:Modul_Kategorien'; llxHeader("", $langs->trans("Categories"), $help_url); --- htdocs/categories/card.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php index 9f275033b01..734f2e89506 100644 --- a/htdocs/categories/card.php +++ b/htdocs/categories/card.php @@ -208,8 +208,9 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr $form = new Form($db); $formother = new FormOther($db); -$helpurl = 'EN:Module_Categories|FR:Module_Catégories'; -llxHeader("", $langs->trans("Categories"), $helpurl); +$help_url = 'EN:Module_Categories|FR:Module_Catégories|DE:Modul_Kategorien'; + +llxHeader("", $langs->trans("Categories"), $help_url); if ($user->rights->categorie->creer) { // Create or add From 953b09adf68a1c9bebd6095595e2c53cfa80dcc6 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:27:29 +0100 Subject: [PATCH 16/39] Update viewcat.php $helpurl -> $help_url --- htdocs/categories/viewcat.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index dedb368202d..817c750a571 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -207,8 +207,10 @@ $formother = new FormOther($db); $arrayofjs = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js'); $arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css'); -$helpurl = ''; -llxHeader("", $langs->trans("Categories"), $helpurl, '', 0, 0, $arrayofjs, $arrayofcss); + +$help_url = ''; + +llxHeader("", $langs->trans("Categories"), $help_url, '', 0, 0, $arrayofjs, $arrayofcss); $title = Categorie::$MAP_TYPE_TITLE_AREA[$type]; From e5f8ca77a9b80d5a59bf950e5a65dd00428e7285 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:30:28 +0100 Subject: [PATCH 17/39] Update card.php $help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses"; llxHeader("", $title, $help_url); --- htdocs/compta/bank/card.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index ccc834835a4..bf74035d553 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -305,8 +305,10 @@ if (!empty($conf->accounting->enabled)) { $countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')'; $title = $langs->trans("FinancialAccount")." - ".$langs->trans("Card"); -$helpurl = "EN:Module_Banks_and_Cash"; -llxHeader("", $title, $helpurl); + +$help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses"; + +llxHeader("", $title, $help_url); // Creation From 6e6609d8766d6b739c55be7ce7957917253a4c3d Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:33:10 +0100 Subject: [PATCH 18/39] Update document.php $help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses"; llxHeader("", $title, $help_url); --- htdocs/compta/bank/document.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 35102281ae9..6f0ffed4153 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -92,8 +92,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; */ $title = $langs->trans("FinancialAccount").' - '.$langs->trans("Documents"); -$helpurl = ""; -llxHeader('', $title, $helpurl); + +$help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses"; + +llxHeader("", $title, $help_url); $form = new Form($db); From b5905bb03253e62b0b49a862c4777df9c7d7d75b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 19 Mar 2021 09:34:40 +0100 Subject: [PATCH 19/39] FIX php 8 warning --- htdocs/product/list.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/product/list.php b/htdocs/product/list.php index bd38e41f4dd..92f302fc177 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -59,6 +59,7 @@ $toselect = GETPOST('toselect', 'array'); $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml')); $search_ref = GETPOST("search_ref", 'alpha'); +$search_ref_supplier = GETPOST("search_ref_supplier", 'alpha'); $search_barcode = GETPOST("search_barcode", 'alpha'); $search_label = GETPOST("search_label", 'alpha'); $search_type = GETPOST("search_type", 'int'); @@ -299,6 +300,7 @@ if (empty($reshook)) { if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers $sall = ""; $search_ref = ""; + $search_ref_supplier = ""; $search_label = ""; $search_barcode = ""; $searchCategoryProductOperator = 0; @@ -567,6 +569,7 @@ if ($resql) { } } + $paramsCat = ''; foreach ($searchCategoryProductList as $searchCategoryProduct) { $paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct); } From b4e929e57f676cf6f064020bb45943d8baf9486c Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:36:49 +0100 Subject: [PATCH 20/39] Update card.php $helpurl -> $help_url --- htdocs/compta/facture/card.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index cd1905f528f..925885e4e7a 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -2815,9 +2815,10 @@ if (!empty($conf->projet->enabled)) { $now = dol_now(); $title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Card'); -$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; -llxHeader('', $title, $helpurl); +$help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; + +llxHeader('', $title, $help_url); // Mode creation From 46c23807e9970b2998d38fe52df2c8bc0c8eabc1 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:38:33 +0100 Subject: [PATCH 21/39] Update document.php $helpurl -> $help_url --- htdocs/compta/facture/document.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php index 4c0544e3810..f4937679504 100644 --- a/htdocs/compta/facture/document.php +++ b/htdocs/compta/facture/document.php @@ -91,8 +91,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; */ $title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents'); -$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; -llxHeader('', $title, $helpurl); + +$help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes"; + +llxHeader('', $title, $help_url); $form = new Form($db); From 91ed200a1f878ea8a6330ed203024e82e464e2c2 Mon Sep 17 00:00:00 2001 From: UT from dolibit <45215329+dolibit-ut@users.noreply.github.com> Date: Fri, 19 Mar 2021 09:51:27 +0100 Subject: [PATCH 22/39] Update llx_20_c_departements.sql --- .../mysql/data/llx_20_c_departements.sql | 102 +++++++++--------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index acd9f0532b5..d85a0b0b52e 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -36,6 +36,57 @@ insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 0, '0', '0',0,'-','-'); +-- Algeria Provinces (id country=13) +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL01', '', 0, '', 'Wilaya d''Adrar', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL02', '', 0, '', 'Wilaya de Chlef', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL03', '', 0, '', 'Wilaya de Laghouat', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL04', '', 0, '', 'Wilaya d''Oum El Bouaghi', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL05', '', 0, '', 'Wilaya de Batna', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL06', '', 0, '', 'Wilaya de Béjaïa', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL07', '', 0, '', 'Wilaya de Biskra', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL08', '', 0, '', 'Wilaya de Béchar', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL09', '', 0, '', 'Wilaya de Blida', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL10', '', 0, '', 'Wilaya de Bouira', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL11', '', 0, '', 'Wilaya de Tamanrasset', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL12', '', 0, '', 'Wilaya de Tébessa', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL13', '', 0, '', 'Wilaya de Tlemcen', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL14', '', 0, '', 'Wilaya de Tiaret', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL15', '', 0, '', 'Wilaya de Tizi Ouzou', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL16', '', 0, '', 'Wilaya d''Alger', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL17', '', 0, '', 'Wilaya de Djelfa', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL18', '', 0, '', 'Wilaya de Jijel', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL19', '', 0, '', 'Wilaya de Sétif ', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL20', '', 0, '', 'Wilaya de Saïda', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL21', '', 0, '', 'Wilaya de Skikda', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL22', '', 0, '', 'Wilaya de Sidi Bel Abbès', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL23', '', 0, '', 'Wilaya d''Annaba', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL24', '', 0, '', 'Wilaya de Guelma', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL25', '', 0, '', 'Wilaya de Constantine', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL26', '', 0, '', 'Wilaya de Médéa', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL27', '', 0, '', 'Wilaya de Mostaganem', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL28', '', 0, '', 'Wilaya de M''Sila', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL29', '', 0, '', 'Wilaya de Mascara', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL30', '', 0, '', 'Wilaya d''Ouargla', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL31', '', 0, '', 'Wilaya d''Oran', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL32', '', 0, '', 'Wilaya d''El Bayadh', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL33', '', 0, '', 'Wilaya d''Illizi', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL34', '', 0, '', 'Wilaya de Bordj Bou Arreridj', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL35', '', 0, '', 'Wilaya de Boumerdès', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL36', '', 0, '', 'Wilaya d''El Tarf', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL37', '', 0, '', 'Wilaya de Tindouf', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL38', '', 0, '', 'Wilaya de Tissemsilt', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL39', '', 0, '', 'Wilaya d''El Oued', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL40', '', 0, '', 'Wilaya de Khenchela', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL41', '', 0, '', 'Wilaya de Souk Ahras', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL42', '', 0, '', 'Wilaya de Tipaza', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL43', '', 0, '', 'Wilaya de Mila', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL44', '', 0, '', 'Wilaya d''Aïn Defla', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL45', '', 0, '', 'Wilaya de Naâma', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL46', '', 0, '', 'Wilaya d''Aïn Témouchent', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL47', '', 0, '', 'Wilaya de Ghardaia', 1); +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL48', '', 0, '', 'Wilaya de Relizane', 1); + + -- Andorra Parròquies (id country=34) INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-002', 'AD100', NULL, NULL, 'Canillo'); INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-003', 'AD200', NULL, NULL, 'Encamp'); @@ -46,7 +97,7 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-008', 'AD700', NULL, NULL, 'Escaldes-Engordany'); --- Austria States (Bundesländer) (id country=41) +-- Austria States / Österreich Bundesländer (id country=41) INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'B','BURGENLAND','Burgenland',1); INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'K','KAERNTEN','Kärnten',1); INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'N','NIEDEROESTERREICH','Niederösterreich',1); @@ -288,55 +339,6 @@ insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('VI',320,NULL,NULL,NULL,'VICENZA'); insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('VT',307,NULL,NULL,NULL,'VITERBO'); --- Provinces Algeria (id country=13) -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL01', 1301, '', 0, '', 'Wilaya d''Adrar', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL02', 1301, '', 0, '', 'Wilaya de Chlef', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL03', 1301, '', 0, '', 'Wilaya de Laghouat', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL04', 1301, '', 0, '', 'Wilaya d''Oum El Bouaghi', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL05', 1301, '', 0, '', 'Wilaya de Batna', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL06', 1301, '', 0, '', 'Wilaya de Béjaïa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL07', 1301, '', 0, '', 'Wilaya de Biskra', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL08', 1301, '', 0, '', 'Wilaya de Béchar', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL09', 1301, '', 0, '', 'Wilaya de Blida', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL10', 1301, '', 0, '', 'Wilaya de Bouira', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL11', 1301, '', 0, '', 'Wilaya de Tamanrasset', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL12', 1301, '', 0, '', 'Wilaya de Tébessa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL13', 1301, '', 0, '', 'Wilaya de Tlemcen', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL14', 1301, '', 0, '', 'Wilaya de Tiaret', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL15', 1301, '', 0, '', 'Wilaya de Tizi Ouzou', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL16', 1301, '', 0, '', 'Wilaya d''Alger', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL17', 1301, '', 0, '', 'Wilaya de Djelfa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL18', 1301, '', 0, '', 'Wilaya de Jijel', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL19', 1301, '', 0, '', 'Wilaya de Sétif ', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL20', 1301, '', 0, '', 'Wilaya de Saïda', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL21', 1301, '', 0, '', 'Wilaya de Skikda', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL22', 1301, '', 0, '', 'Wilaya de Sidi Bel Abbès', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL23', 1301, '', 0, '', 'Wilaya d''Annaba', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL24', 1301, '', 0, '', 'Wilaya de Guelma', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL25', 1301, '', 0, '', 'Wilaya de Constantine', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL26', 1301, '', 0, '', 'Wilaya de Médéa', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL27', 1301, '', 0, '', 'Wilaya de Mostaganem', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL28', 1301, '', 0, '', 'Wilaya de M''Sila', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL29', 1301, '', 0, '', 'Wilaya de Mascara', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL30', 1301, '', 0, '', 'Wilaya d''Ouargla', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL31', 1301, '', 0, '', 'Wilaya d''Oran', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL32', 1301, '', 0, '', 'Wilaya d''El Bayadh', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL33', 1301, '', 0, '', 'Wilaya d''Illizi', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL34', 1301, '', 0, '', 'Wilaya de Bordj Bou Arreridj', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL35', 1301, '', 0, '', 'Wilaya de Boumerdès', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL36', 1301, '', 0, '', 'Wilaya d''El Tarf', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL37', 1301, '', 0, '', 'Wilaya de Tindouf', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL38', 1301, '', 0, '', 'Wilaya de Tissemsilt', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL39', 1301, '', 0, '', 'Wilaya d''El Oued', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL40', 1301, '', 0, '', 'Wilaya de Khenchela', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL41', 1301, '', 0, '', 'Wilaya de Souk Ahras', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL42', 1301, '', 0, '', 'Wilaya de Tipaza', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL43', 1301, '', 0, '', 'Wilaya de Mila', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL44', 1301, '', 0, '', 'Wilaya d''Aïn Defla', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL45', 1301, '', 0, '', 'Wilaya de Naâma', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL46', 1301, '', 0, '', 'Wilaya d''Aïn Témouchent', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL47', 1301, '', 0, '', 'Wilaya de Ghardaia', 1); -INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL48', 1301, '', 0, '', 'Wilaya de Relizane', 1); -- Provinces Maroc - Moroco (id country=12) INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('MA', 1209, '', 0, '', 'Province de Benslimane', 1); From a1f6886e97089c2f6f11dffeaf33894487395157 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 19 Mar 2021 10:01:40 +0100 Subject: [PATCH 23/39] FIX avoid php8 warning in products list --- htdocs/core/class/extrafields.class.php | 4 ++-- htdocs/core/class/html.form.class.php | 4 ++-- htdocs/core/tpl/extrafields_list_print_fields.tpl.php | 2 +- htdocs/core/tpl/extrafields_list_search_input.tpl.php | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index ca703979a7d..0ea4ce1dbe3 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1597,7 +1597,7 @@ class ExtraFields if (!empty($extrafieldsobjectkey)) { $label = $this->attributes[$extrafieldsobjectkey]['label'][$key]; $type = $this->attributes[$extrafieldsobjectkey]['type'][$key]; - $size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; + $size = (int) $this->attributes[$extrafieldsobjectkey]['size'][$key]; $default = $this->attributes[$extrafieldsobjectkey]['default'][$key]; $computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key]; $unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key]; @@ -1666,7 +1666,7 @@ class ExtraFields $value = price($value, 0, $langs, 0, 0, -1); } } elseif ($type == 'select') { - $valstr = $param['options'][$value]; + $valstr = (!empty($param['options'][$value]) ? $param['options'][$value] : ''); if (($pos = strpos($valstr, "|")) !== false) { $valstr = substr($valstr, 0, $pos); } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8b0b482f33f..b18ed68eaa2 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6684,7 +6684,7 @@ class Form if (!dol_eval($val['enabled'], 1, 1)) { continue; } - if ($val['showoncombobox']) { + if (!empty($val['showoncombobox'])) { $tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '').'t.'.$key; } } @@ -6817,7 +6817,7 @@ class Form if (!$forcecombo) { include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; - $out .= ajax_combobox($htmlname, null, $conf->global->$confkeyforautocompletemode); + $out .= ajax_combobox($htmlname, null, (!empty($conf->global->$confkeyforautocompletemode) ? $conf->global->$confkeyforautocompletemode : 0)); } } else { dol_print_error($this->db); diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index 5ea0e4821d6..4b27ecc4496 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -35,7 +35,7 @@ if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table } $value = $datenotinstring; } else { - $value = $obj->$tmpkey; + $value = (!empty($obj->$tmpkey) ? $obj->$tmpkey : ''); } // If field is a computed field, we make computation to get value if ($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]) { diff --git a/htdocs/core/tpl/extrafields_list_search_input.tpl.php b/htdocs/core/tpl/extrafields_list_search_input.tpl.php index 77329eb06a4..72f888f256a 100644 --- a/htdocs/core/tpl/extrafields_list_search_input.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_input.tpl.php @@ -37,17 +37,17 @@ if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table if (in_array($typeofextrafield, array('int', 'double'))) { $searchclass = 'searchnum'; } - print ''; + print ''; } elseif (in_array($typeofextrafield, array('datetime', 'timestamp'))) { $morecss = ''; - echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$tmpkey], '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); + echo $extrafields->showInputField($key, (empty($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); } else { // for the type as 'checkbox', 'chkbxlst', 'sellist' we should use code instead of id (example: I declare a 'chkbxlst' to have a link with dictionnairy, I have to extend it with the 'code' instead 'rowid') $morecss = ''; if (in_array($typeofextrafield, array('link', 'sellist', 'text', 'html'))) { $morecss = 'maxwidth200'; } - echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$tmpkey], '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); + echo $extrafields->showInputField($key, (empty($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); } print ''; } From ee701bb4802ec3e185aaf3bd245d3211b6ade7f3 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 19 Mar 2021 09:05:20 +0000 Subject: [PATCH 24/39] Fixing style errors. --- htdocs/core/class/extrafields.class.php | 2 +- htdocs/core/tpl/extrafields_list_print_fields.tpl.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 0ea4ce1dbe3..2ca0bf6b439 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1666,7 +1666,7 @@ class ExtraFields $value = price($value, 0, $langs, 0, 0, -1); } } elseif ($type == 'select') { - $valstr = (!empty($param['options'][$value]) ? $param['options'][$value] : ''); + $valstr = (!empty($param['options'][$value]) ? $param['options'][$value] : ''); if (($pos = strpos($valstr, "|")) !== false) { $valstr = substr($valstr, 0, $pos); } diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php index 4b27ecc4496..4c56b0223cd 100644 --- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php +++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php @@ -35,7 +35,7 @@ if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table } $value = $datenotinstring; } else { - $value = (!empty($obj->$tmpkey) ? $obj->$tmpkey : ''); + $value = (!empty($obj->$tmpkey) ? $obj->$tmpkey : ''); } // If field is a computed field, we make computation to get value if ($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]) { From a9398e5630b70a2f172100ca43bbf0db73858c0b Mon Sep 17 00:00:00 2001 From: ptibogxiv Date: Fri, 19 Mar 2021 12:39:38 +0100 Subject: [PATCH 25/39] FIx get optionnal in membertype with API --- htdocs/adherents/class/adherent_type.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 9acecaab1ce..a5f9e53d694 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -479,6 +479,9 @@ class AdherentType extends CommonObject if (!empty($conf->global->MAIN_MULTILANGS)) { $this->getMultiLangs(); } + + // fetch optionals attributes and labels + $this->fetch_optionals(); } return 1; From ba29f327a9892afb723867daedbad91208aa609c Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 19 Mar 2021 11:41:27 +0000 Subject: [PATCH 26/39] Fixing style errors. --- htdocs/adherents/class/adherent_type.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index a5f9e53d694..5932bf58e6d 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -479,7 +479,7 @@ class AdherentType extends CommonObject if (!empty($conf->global->MAIN_MULTILANGS)) { $this->getMultiLangs(); } - + // fetch optionals attributes and labels $this->fetch_optionals(); } From 84b71dbcc8c8f8e02bba930e1c101b4a45597785 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 16:34:17 +0100 Subject: [PATCH 27/39] fix php8 warning --- htdocs/adherents/subscription.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 79f1a4da036..c32ea99b3bd 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -121,6 +121,7 @@ $paymentdate = -1; * Actions */ +$parameters = array(); $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); if ($reshook < 0) { setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); From 239dae03bfe8d793176907f6324ebd7db98155d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 16:57:12 +0100 Subject: [PATCH 28/39] fix php8 warnings --- htdocs/core/ajax/ajaxdirtree.php | 7 +++++-- htdocs/core/tpl/filemanager.tpl.php | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php index 1977cfac6e4..9a0a11f04d4 100644 --- a/htdocs/core/ajax/ajaxdirtree.php +++ b/htdocs/core/ajax/ajaxdirtree.php @@ -58,8 +58,8 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call if ($selecteddir != '/') { $selecteddir = preg_replace('/\/$/', '', $selecteddir); // We removed last '/' except if it is '/' } -} else // For no ajax call -{ +} else { + // For no ajax call //if (GETPOST('preopened')) { $_GET['dir'] = $_POST['dir'] = GETPOST('preopened'); } $openeddir = GETPOST('openeddir'); @@ -76,6 +76,9 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call } } +$websitekey = GETPOST('websitekey', 'alpha'); +$pageid = GETPOST('pageid', 'int'); + // Load translation files required by the page $langs->load("ecm"); diff --git a/htdocs/core/tpl/filemanager.tpl.php b/htdocs/core/tpl/filemanager.tpl.php index de165c8c752..6ff7bba2390 100644 --- a/htdocs/core/tpl/filemanager.tpl.php +++ b/htdocs/core/tpl/filemanager.tpl.php @@ -71,7 +71,8 @@ print '
'; // Toolbar if ($permtoadd) { - print ''; + $websitekeyandpageid = (!empty($websitekey) ? '&website='.$websitekey : '').(!empty($pageid) ? '&pageid='.$pageid : ''); + print ''; print ''; print ''; } else { From 93ae7a3fed715cd9b2790d6c77f669a11c61b128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 17:01:14 +0100 Subject: [PATCH 29/39] fix php8 warning --- htdocs/core/class/html.formfile.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 4a0114b5244..498078b6b15 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1778,7 +1778,7 @@ class FormFile // Share link print ''; - if ($file['share']) { + if (!empty($file['share'])) { // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file From d20e8798e8f005bbd0a2999c0cf19a84310b1ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 17:14:05 +0100 Subject: [PATCH 30/39] fix warning --- htdocs/contact/perso.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php index 5c7356fae00..8d2969a1370 100644 --- a/htdocs/contact/perso.php +++ b/htdocs/contact/perso.php @@ -2,7 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2018-2020 Frédéric France + * Copyright (C) 2018-2021 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -119,7 +119,7 @@ if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $c $title = $object->lastname; } $help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas'; -llxHeader('', $title, $helpurl); +llxHeader('', $title, $help_url); $form = new Form($db); From 19079dcae6c69d23198de18b3327f5245184dceb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 17:17:08 +0100 Subject: [PATCH 31/39] fix php8 warning --- htdocs/adherents/type.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index a867a884775..25ee4a8e39f 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -43,12 +43,13 @@ $cancel = GETPOST('cancel', 'alpha'); $backtopage = GETPOST('backtopage', 'alpha'); $search_lastname = GETPOST('search_lastname', 'alpha'); -$search_login = GETPOST('search_login', 'alpha'); -$search_email = GETPOST('search_email', 'alpha'); +$search_login = GETPOST('search_login', 'alpha'); +$search_email = GETPOST('search_email', 'alpha'); $type = GETPOST('type', 'intcomma'); -$status = GETPOST('status', 'alpha'); +$status = GETPOST('status', 'alpha'); +$optioncss = GETPOST('optioncss', 'alpha'); -$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; +$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit; $sortfield = GETPOST("sortfield", 'alpha'); $sortorder = GETPOST("sortorder", 'alpha'); $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); From 65e4acdb82e169ec29f59832c1f42a12953f4c58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 17:23:28 +0100 Subject: [PATCH 32/39] fix php8 warnings --- htdocs/adherents/cartes/carte.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index be9c654941a..8d9ed70a925 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -262,7 +262,7 @@ dol_htmloutput_errors($mesg); print '
'; -print img_picto('', 'puce').' '.$langs->trans("DocForAllMembersCards", ($conf->global->ADHERENT_CARD_TYPE ? $conf->global->ADHERENT_CARD_TYPE : $langs->transnoentitiesnoconv("None"))).' '; +print img_picto('', 'puce').' '.$langs->trans("DocForAllMembersCards", (!empty($conf->global->ADHERENT_CARD_TYPE) ? $conf->global->ADHERENT_CARD_TYPE : $langs->transnoentitiesnoconv("None"))).' '; print '
'; print ''; print ''; @@ -275,13 +275,13 @@ foreach (array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards] = $_Avery_Labels[$codecards]['name']; } asort($arrayoflabels); -print $form->selectarray('model', $arrayoflabels, (GETPOST('model') ?GETPOST('model') : $conf->global->ADHERENT_CARD_TYPE), 1, 0, 0, '', 0, 0, 0, '', '', 1); +print $form->selectarray('model', $arrayoflabels, (GETPOST('model') ? GETPOST('model') : (empty($conf->global->ADHERENT_CARD_TYPE) ? '' : $conf->global->ADHERENT_CARD_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1); print '
'; print '
'; print '

'; -print img_picto('', 'puce').' '.$langs->trans("DocForOneMemberCards", ($conf->global->ADHERENT_CARD_TYPE ? $conf->global->ADHERENT_CARD_TYPE : $langs->transnoentitiesnoconv("None"))).' '; +print img_picto('', 'puce').' '.$langs->trans("DocForOneMemberCards", (!empty($conf->global->ADHERENT_CARD_TYPE) ? $conf->global->ADHERENT_CARD_TYPE : $langs->transnoentitiesnoconv("None"))).' '; print '
'; print ''; print ''; @@ -293,14 +293,14 @@ foreach (array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards] = $_Avery_Labels[$codecards]['name']; } asort($arrayoflabels); -print $form->selectarray('model', $arrayoflabels, (GETPOST('model') ?GETPOST('model') : $conf->global->ADHERENT_CARD_TYPE), 1, 0, 0, '', 0, 0, 0, '', '', 1); +print $form->selectarray('model', $arrayoflabels, (GETPOST('model') ?GETPOST('model') : (empty($conf->global->ADHERENT_CARD_TYPE) ? '' : $conf->global->ADHERENT_CARD_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1); print '
'.$langs->trans("Login").': '; print '
'; print '
'; print '

'; -print img_picto('', 'puce').' '.$langs->trans("DocForLabels", $conf->global->ADHERENT_ETIQUETTE_TYPE).' '; +print img_picto('', 'puce').' '.$langs->trans("DocForLabels", (empty($conf->global->ADHERENT_ETIQUETTE_TYPE) ? '' : $conf->global->ADHERENT_ETIQUETTE_TYPE)).' '; print '
'; print ''; print ''; @@ -312,7 +312,7 @@ foreach (array_keys($_Avery_Labels) as $codecards) { $arrayoflabels[$codecards] = $_Avery_Labels[$codecards]['name']; } asort($arrayoflabels); -print $form->selectarray('modellabel', $arrayoflabels, (GETPOST('modellabel') ?GETPOST('modellabel') : $conf->global->ADHERENT_ETIQUETTE_TYPE), 1, 0, 0, '', 0, 0, 0, '', '', 1); +print $form->selectarray('modellabel', $arrayoflabels, (GETPOST('modellabel') ? GETPOST('modellabel') : (empty($conf->global->ADHERENT_ETIQUETTE_TYPE) ? '' : $conf->global->ADHERENT_ETIQUETTE_TYPE)), 1, 0, 0, '', 0, 0, 0, '', '', 1); print '
'; print '
'; From 4c5ddc44dc949d9cb6fcc245ec9a7ff46eccac12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Fri, 19 Mar 2021 17:58:01 +0100 Subject: [PATCH 33/39] get conf global function --- htdocs/admin/mails.php | 6 +++--- htdocs/core/lib/functions.lib.php | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 1c59d1bb26d..515357df904 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -562,9 +562,9 @@ if ($action == 'edit') { if (empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { // Force e-mail recipient - print ''.$langs->trans("MAIN_MAIL_FORCE_SENDTO").''.$conf->global->MAIN_MAIL_FORCE_SENDTO; - if (!empty($conf->global->MAIN_MAIL_FORCE_SENDTO)) { - if (!isValidEmail($conf->global->MAIN_MAIL_FORCE_SENDTO)) { + print ''.$langs->trans("MAIN_MAIL_FORCE_SENDTO").''.getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'); + if (!empty(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'))) { + if (!isValidEmail(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'))) { print img_warning($langs->trans("ErrorBadEMail")); } else { print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue")); diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e3a218711dd..5151a0a39dc 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -41,6 +41,29 @@ include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php'; +/** + * Return dolibarr global constant string value + * @param string $key key to return value, return '' if not set + * @return string + */ +function getDolGlobalString($key) +{ + global $conf; + // return $conf->global->$key ?? ''; + return (string) (empty($conf->global->$key) ? '' : $conf->global->$key); +} + +/** + * Return dolibarr global constant int value + * @param string $key key to return value, return 0 if not set + * @return int + */ +function getDolGlobalInt($key) +{ + global $conf; + // return $conf->global->$key ?? 0; + return (int) (empty($conf->global->$key) ? 0 : $conf->global->$key); +} /** * Return a DoliDB instance (database handler). From e2fcadef4ae227f058b1d17b47e8ae4b0d4475e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 08:59:54 +0100 Subject: [PATCH 34/39] fix nested comments for doxygen --- htdocs/admin/commande.php | 48 ++++++++++++--------------------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 6fb4430d88e..89363a9027b 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -9,6 +9,7 @@ * Copyright (C) 2011-2013 Juanjo Menent * Copyright (C) 2011-2016 Philippe Grand * Copyright (C) 2013 Florian Henry + * Copyright (C) 2021 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -642,7 +643,7 @@ print ''; // Shippable Icon in List /* Kept as hidden feature for the moment, result seems bugged. -Whet is definition of "shippable" according to all different STOCK_CALCULATE_... options ? +Where is definition of "shippable" according to all different STOCK_CALCULATE_... options ? print ''; print ''.$langs->trans("ShippableOrderIconInList").''; @@ -657,65 +658,46 @@ if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) { } print ''; print ''; +*/ /* // Seems to be not so used. So kept hidden for the moment to avoid dangerous options inflation. // Ask for payment bank during order -if ($conf->banque->enabled) -{ +if ($conf->banque->enabled) { print ''; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").' '; - if (! empty($conf->use_javascript_ajax)) - { + if (! empty($conf->use_javascript_ajax)) { print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER'); - } - else - { - if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER)) - { + } else { + if (empty($conf->global->BANK_ASK_PAYMENT_BANK_DURING_ORDER)) { print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - else - { + } else { print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } } print ''; -} -else -{ +} else { print ''; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").' '.$langs->trans('NotAvailable').''; } // Ask for warehouse during order -if ($conf->stock->enabled) -{ - +if ($conf->stock->enabled) { print ''; print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").' '; - if (! empty($conf->use_javascript_ajax)) - { + if (! empty($conf->use_javascript_ajax)) { print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER'); - } - else - { - if (empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) - { + } else { + if (empty($conf->global->WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER)) { print ''.img_picto($langs->trans("Disabled"),'switch_off').''; - } - else - { + } else { print ''.img_picto($langs->trans("Enabled"),'switch_on').''; } } print ''; -} -else -{ - +} else { print ''; print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").' '.$langs->trans('NotAvailable').''; } From 1a2b22def49682d2737a5a2c961e9388bca67090 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 09:14:52 +0100 Subject: [PATCH 35/39] fix doxygen --- htdocs/core/modules/delivery/mod_delivery_saphir.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php index ef3e7f7b7c0..af1900803c8 100644 --- a/htdocs/core/modules/delivery/mod_delivery_saphir.php +++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/core/modules/delivery/mod_livraison_saphir.php + * \file htdocs/core/modules/delivery/mod_delivery_saphir.php * \ingroup expedition * \brief Fichier contenant la classe du modele de numerotation de reference de livraison Saphir */ From 48e1a796e0adf380342577b5f49f472905e6f557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 09:16:38 +0100 Subject: [PATCH 36/39] fix doxygen --- htdocs/eventorganization/conferenceorbooth_card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/eventorganization/conferenceorbooth_card.php b/htdocs/eventorganization/conferenceorbooth_card.php index 6f223821bd3..495d0334a10 100644 --- a/htdocs/eventorganization/conferenceorbooth_card.php +++ b/htdocs/eventorganization/conferenceorbooth_card.php @@ -17,7 +17,7 @@ */ /** - * \file event.php + * \file htdocs/eventorganization/conferenceorbooth_card.php * \ingroup eventorganization * \brief Page to create/edit/view conferenceorbooth */ From bae1770176c379558bb651574a0db8f5517ba87c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 10:00:24 +0100 Subject: [PATCH 37/39] uniformise comments to remove nested comments --- htdocs/adherents/admin/adherent_extrafields.php | 13 ++----------- .../adherents/admin/adherent_type_extrafields.php | 13 ++----------- htdocs/admin/agenda_extrafields.php | 13 +++---------- .../commande_fournisseur_dispatch_extrafields.php | 13 ++----------- htdocs/admin/delivery_extrafields.php | 13 ++----------- htdocs/admin/deliverydet_extrafields.php | 13 ++----------- htdocs/admin/ecm_directories_extrafields.php | 13 ++----------- htdocs/admin/ecm_files_extrafields.php | 13 ++----------- htdocs/admin/expedition_extrafields.php | 14 ++------------ htdocs/admin/expeditiondet_extrafields.php | 13 ++----------- htdocs/admin/expensereport_extrafields.php | 12 ++---------- htdocs/admin/holiday_extrafields.php | 14 +++----------- htdocs/admin/order_extrafields.php | 13 ++----------- htdocs/admin/orderdet_extrafields.php | 13 ++----------- htdocs/admin/reception_extrafields.php | 13 ++----------- htdocs/admin/resource_extrafields.php | 14 ++------------ htdocs/admin/supplierinvoice_extrafields.php | 14 ++------------ htdocs/admin/supplierinvoicedet_extrafields.php | 14 ++------------ htdocs/admin/supplierorder_extrafields.php | 14 ++------------ htdocs/admin/supplierorderdet_extrafields.php | 14 ++------------ htdocs/admin/ticket_extrafields.php | 13 ++----------- htdocs/asset/admin/assets_type_extrafields.php | 14 ++------------ htdocs/categories/admin/categorie_extrafields.php | 14 ++------------ htdocs/comm/admin/propal_extrafields.php | 14 ++------------ htdocs/comm/admin/propaldet_extrafields.php | 14 ++------------ .../facture/admin/facturedet_cust_extrafields.php | 4 ++-- .../admin/facturedet_rec_cust_extrafields.php | 4 ++-- htdocs/contrat/admin/contract_extrafields.php | 14 ++------------ htdocs/contrat/admin/contractdet_extrafields.php | 14 ++------------ htdocs/fichinter/admin/fichinter_extrafields.php | 14 ++------------ .../fichinter/admin/fichinterdet_extrafields.php | 14 ++------------ htdocs/product/admin/product_extrafields.php | 13 ++----------- htdocs/product/admin/product_lot_extrafields.php | 14 ++------------ .../product/admin/product_supplier_extrafields.php | 14 ++------------ htdocs/product/admin/stock_extrafields.php | 14 ++------------ htdocs/projet/admin/project_extrafields.php | 14 ++------------ htdocs/projet/admin/project_task_extrafields.php | 14 ++------------ htdocs/salaries/admin/salaries_extrafields.php | 14 ++------------ htdocs/societe/admin/contact_extrafields.php | 14 ++------------ htdocs/societe/admin/societe_extrafields.php | 14 ++------------ .../admin/supplier_proposal_extrafields.php | 14 ++------------ .../admin/supplier_proposaldet_extrafields.php | 14 ++------------ htdocs/user/admin/group_extrafields.php | 14 ++------------ htdocs/user/admin/user_extrafields.php | 14 ++------------ 44 files changed, 90 insertions(+), 490 deletions(-) diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index 0465b7eee4f..ec3b3824db7 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -89,12 +89,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '

'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -102,11 +97,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print '

'; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index c33ee5a4739..34175da465f 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -92,12 +92,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -105,11 +100,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index f140b207aaf..50e4a3e92c7 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -94,12 +94,8 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -107,11 +103,8 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ + +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/commande_fournisseur_dispatch_extrafields.php b/htdocs/admin/commande_fournisseur_dispatch_extrafields.php index 1acad0506c0..d0c7c85463e 100644 --- a/htdocs/admin/commande_fournisseur_dispatch_extrafields.php +++ b/htdocs/admin/commande_fournisseur_dispatch_extrafields.php @@ -99,12 +99,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -112,11 +107,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/delivery_extrafields.php b/htdocs/admin/delivery_extrafields.php index 7222880ae47..cf712bc6ecf 100644 --- a/htdocs/admin/delivery_extrafields.php +++ b/htdocs/admin/delivery_extrafields.php @@ -96,12 +96,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -109,11 +104,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/deliverydet_extrafields.php b/htdocs/admin/deliverydet_extrafields.php index 45068a252b3..c74f5235d42 100644 --- a/htdocs/admin/deliverydet_extrafields.php +++ b/htdocs/admin/deliverydet_extrafields.php @@ -97,12 +97,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -110,11 +105,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/ecm_directories_extrafields.php b/htdocs/admin/ecm_directories_extrafields.php index 99cedac9f3f..d913826b245 100644 --- a/htdocs/admin/ecm_directories_extrafields.php +++ b/htdocs/admin/ecm_directories_extrafields.php @@ -96,23 +96,14 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/ecm_files_extrafields.php b/htdocs/admin/ecm_files_extrafields.php index d7d9f809534..b260eff55fa 100644 --- a/htdocs/admin/ecm_files_extrafields.php +++ b/htdocs/admin/ecm_files_extrafields.php @@ -96,23 +96,14 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index 70a9629e1d6..b76ee35b76c 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -95,13 +95,7 @@ if ($action != 'create' && $action != 'edit') { print "
"; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -109,11 +103,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index 7df27d0d84b..4f807ee9da3 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -97,12 +97,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -110,11 +105,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index 716ba5d1a03..25771ef63d0 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -90,12 +90,8 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -103,11 +99,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/holiday_extrafields.php b/htdocs/admin/holiday_extrafields.php index 732eb0997d7..609187058e3 100644 --- a/htdocs/admin/holiday_extrafields.php +++ b/htdocs/admin/holiday_extrafields.php @@ -90,12 +90,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -103,11 +98,8 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ + +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index 701156303bb..e11ac077cc6 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -93,12 +93,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -106,11 +101,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index 6869d7897b3..c89ff3e3655 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -94,12 +94,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -107,11 +102,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/reception_extrafields.php b/htdocs/admin/reception_extrafields.php index 9dea1bf8fd7..ab7d18b1331 100644 --- a/htdocs/admin/reception_extrafields.php +++ b/htdocs/admin/reception_extrafields.php @@ -99,12 +99,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -112,11 +107,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/resource_extrafields.php b/htdocs/admin/resource_extrafields.php index ff13b5f4573..c4967f75313 100644 --- a/htdocs/admin/resource_extrafields.php +++ b/htdocs/admin/resource_extrafields.php @@ -92,13 +92,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -106,11 +100,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index 59e0e857161..4121073dec2 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -93,13 +93,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -107,11 +101,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index 61a14a34844..0156eed5072 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -95,13 +95,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -109,11 +103,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index 5e0cfb38d4c..5a49c8f5bfd 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -93,13 +93,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -107,11 +101,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index 25689c7b9f5..07f223d59c8 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -94,13 +94,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -108,11 +102,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/admin/ticket_extrafields.php b/htdocs/admin/ticket_extrafields.php index 4a50beaa32e..0a4a851dae2 100644 --- a/htdocs/admin/ticket_extrafields.php +++ b/htdocs/admin/ticket_extrafields.php @@ -84,12 +84,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -97,11 +92,7 @@ if ($action == 'create') { include DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/asset/admin/assets_type_extrafields.php b/htdocs/asset/admin/assets_type_extrafields.php index 6d2799e0228..165361f7f57 100644 --- a/htdocs/asset/admin/assets_type_extrafields.php +++ b/htdocs/asset/admin/assets_type_extrafields.php @@ -82,13 +82,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -96,11 +90,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php index 0d691995c29..02cd6e2a784 100644 --- a/htdocs/categories/admin/categorie_extrafields.php +++ b/htdocs/categories/admin/categorie_extrafields.php @@ -86,13 +86,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -100,11 +94,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index e314d0b3e66..bfa62eba7fc 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -86,13 +86,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -100,11 +94,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index 4cbe35b31c5..834722f2afd 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -94,13 +94,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -108,11 +102,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index 82520c02fac..05aa47737be 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -91,7 +91,7 @@ if ($action != 'create' && $action != 'edit') { /* * - * Creation d'un champ optionnel + * Creation of an optional field * */ @@ -104,7 +104,7 @@ if ($action == 'create') { /* * - * Edition d'un champ optionnel + * Edition of an optional field * */ if ($action == 'edit' && !empty($attrname)) { diff --git a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php index 5264ee5472c..6ebdfae6277 100644 --- a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php @@ -91,7 +91,7 @@ if ($action != 'create' && $action != 'edit') { /* * - * Creation d'un champ optionnel + * Creation of an optional field * */ @@ -104,7 +104,7 @@ if ($action == 'create') { /* * - * Edition d'un champ optionnel + * Edition of an optional field * */ if ($action == 'edit' && !empty($attrname)) { diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php index dc361a1f0b6..b725ef6f3f4 100644 --- a/htdocs/contrat/admin/contract_extrafields.php +++ b/htdocs/contrat/admin/contract_extrafields.php @@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -102,11 +96,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print '

'; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php index 6e83f0a4c1b..70d3193c12f 100644 --- a/htdocs/contrat/admin/contractdet_extrafields.php +++ b/htdocs/contrat/admin/contractdet_extrafields.php @@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel - /* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -102,11 +96,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/fichinter/admin/fichinter_extrafields.php b/htdocs/fichinter/admin/fichinter_extrafields.php index 2fec51a0f5b..552d9f70c97 100644 --- a/htdocs/fichinter/admin/fichinter_extrafields.php +++ b/htdocs/fichinter/admin/fichinter_extrafields.php @@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -101,11 +95,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/fichinter/admin/fichinterdet_extrafields.php b/htdocs/fichinter/admin/fichinterdet_extrafields.php index 1cbdeb4cf0a..439cad6c532 100644 --- a/htdocs/fichinter/admin/fichinterdet_extrafields.php +++ b/htdocs/fichinter/admin/fichinterdet_extrafields.php @@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel - /* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -102,11 +96,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php index 0962d1ddf44..aea75f78aa8 100644 --- a/htdocs/product/admin/product_extrafields.php +++ b/htdocs/product/admin/product_extrafields.php @@ -99,12 +99,7 @@ if ($action != 'create' && $action != 'edit') { } -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -112,11 +107,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/product/admin/product_lot_extrafields.php b/htdocs/product/admin/product_lot_extrafields.php index 91e19ee1fa7..fc14b4c142c 100644 --- a/htdocs/product/admin/product_lot_extrafields.php +++ b/htdocs/product/admin/product_lot_extrafields.php @@ -91,13 +91,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -105,11 +99,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/product/admin/product_supplier_extrafields.php b/htdocs/product/admin/product_supplier_extrafields.php index 8c3a10a4b74..daafa2f668d 100644 --- a/htdocs/product/admin/product_supplier_extrafields.php +++ b/htdocs/product/admin/product_supplier_extrafields.php @@ -99,13 +99,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -113,11 +107,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/product/admin/stock_extrafields.php b/htdocs/product/admin/stock_extrafields.php index 3f860564b48..e72c9f1b1bf 100644 --- a/htdocs/product/admin/stock_extrafields.php +++ b/htdocs/product/admin/stock_extrafields.php @@ -86,13 +86,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -100,11 +94,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/projet/admin/project_extrafields.php b/htdocs/projet/admin/project_extrafields.php index e011b1a02c3..c4a4caa47fb 100644 --- a/htdocs/projet/admin/project_extrafields.php +++ b/htdocs/projet/admin/project_extrafields.php @@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -101,11 +95,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/projet/admin/project_task_extrafields.php b/htdocs/projet/admin/project_task_extrafields.php index 5222706d7d0..da79010076a 100644 --- a/htdocs/projet/admin/project_task_extrafields.php +++ b/htdocs/projet/admin/project_task_extrafields.php @@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -101,11 +95,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/salaries/admin/salaries_extrafields.php b/htdocs/salaries/admin/salaries_extrafields.php index 59074e582d2..38303518ac4 100644 --- a/htdocs/salaries/admin/salaries_extrafields.php +++ b/htdocs/salaries/admin/salaries_extrafields.php @@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '

'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -101,11 +95,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print '

'; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/societe/admin/contact_extrafields.php b/htdocs/societe/admin/contact_extrafields.php index 3841a7c66ea..6607efa554d 100644 --- a/htdocs/societe/admin/contact_extrafields.php +++ b/htdocs/societe/admin/contact_extrafields.php @@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -101,11 +95,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/societe/admin/societe_extrafields.php b/htdocs/societe/admin/societe_extrafields.php index d1ffffd6b87..a785b95c892 100644 --- a/htdocs/societe/admin/societe_extrafields.php +++ b/htdocs/societe/admin/societe_extrafields.php @@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel - /* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -101,11 +95,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print '
'; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php index 035be6ff86d..66bcf2c61e4 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php @@ -82,13 +82,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print "
"; print load_fiche_titre($langs->trans('NewAttribute')); @@ -96,11 +90,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php index f4b63f25cd7..5a061101fab 100644 --- a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php +++ b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php @@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation d'un champ optionnel */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -102,11 +96,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition d'un champ optionnel */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/user/admin/group_extrafields.php b/htdocs/user/admin/group_extrafields.php index 627af1c3b9d..b258f991a47 100644 --- a/htdocs/user/admin/group_extrafields.php +++ b/htdocs/user/admin/group_extrafields.php @@ -89,13 +89,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -103,11 +97,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Edition of an optional field */ -/* */ -/* ************************************************************************** */ +// Edition of an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); diff --git a/htdocs/user/admin/user_extrafields.php b/htdocs/user/admin/user_extrafields.php index 25141ed4fcd..7e22a1c7122 100644 --- a/htdocs/user/admin/user_extrafields.php +++ b/htdocs/user/admin/user_extrafields.php @@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') { print ""; } - -/* ************************************************************************** */ -/* */ -/* Creation of an optional field */ -/* */ -/* ************************************************************************** */ - +// Creation of an optional field if ($action == 'create') { print '
'; print load_fiche_titre($langs->trans('NewAttribute')); @@ -102,11 +96,7 @@ if ($action == 'create') { require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php'; } -/* ************************************************************************** */ -/* */ -/* Editing an optional field */ -/* */ -/* ************************************************************************** */ +// Editing an optional field if ($action == 'edit' && !empty($attrname)) { print "
"; print load_fiche_titre($langs->trans("FieldEdition", $attrname)); From 9f02d8cdb11c3611a43114200d5590488fa033ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 10:15:00 +0100 Subject: [PATCH 38/39] fix doxygen --- htdocs/recruitment/admin/candidature_extrafields.php | 2 +- htdocs/recruitment/admin/jobposition_extrafields.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/recruitment/admin/candidature_extrafields.php b/htdocs/recruitment/admin/candidature_extrafields.php index 984d92ce913..1f0ac538d0b 100644 --- a/htdocs/recruitment/admin/candidature_extrafields.php +++ b/htdocs/recruitment/admin/candidature_extrafields.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/recruitement/admin/candidature_extrafields.php + * \file htdocs/recruitment/admin/candidature_extrafields.php * \ingroup recruitment * \brief Page to setup extra fields of Candidature */ diff --git a/htdocs/recruitment/admin/jobposition_extrafields.php b/htdocs/recruitment/admin/jobposition_extrafields.php index 7df03c0c543..3b17322d5eb 100644 --- a/htdocs/recruitment/admin/jobposition_extrafields.php +++ b/htdocs/recruitment/admin/jobposition_extrafields.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/recruitement/admin/jobposition_extrafields.php + * \file htdocs/recruitment/admin/jobposition_extrafields.php * \ingroup recruitment * \brief Page to setup extra fields of Candidature */ From 4cb7c901846a557bb8237383968121b60913bd7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 11:38:53 +0100 Subject: [PATCH 39/39] fix stats --- htdocs/societe/class/societe.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 47d714e08db..c141290d9e9 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -15,7 +15,7 @@ * Copyright (C) 2017 Rui Strecht * Copyright (C) 2018 Philippe Grand * Copyright (C) 2019-2020 Josep Lluís Amador - * Copyright (C) 2019 Frédéric France + * Copyright (C) 2019-2021 Frédéric France * Copyright (C) 2020 Open-Dsi * * This program is free software; you can redistribute it and/or modify @@ -4247,7 +4247,7 @@ class Societe extends CommonObject $table = 'supplier_proposal'; } - $sql = "SELECT rowid, total_ht, total as total_ttc, fk_statut as status FROM ".MAIN_DB_PREFIX.$table." as f"; + $sql = "SELECT rowid, total_ht, total_ttc, fk_statut as status FROM ".MAIN_DB_PREFIX.$table." as f"; $sql .= " WHERE fk_soc = ".$this->id; if ($mode == 'supplier') { $sql .= " AND entity IN (".getEntity('supplier_proposal').")";