From f6e7285949f92287372aaafe2ec5dd9e21ff7445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 19:06:15 +0100 Subject: [PATCH 1/2] rename files from adherent to member --- htdocs/adherents/admin/{adherent.php => member.php} | 0 .../admin/{adherent_emails.php => member_emails.php} | 2 +- .../{adherent_extrafields.php => member_extrafields.php} | 2 +- ...t_type_extrafields.php => member_type_extrafields.php} | 2 +- htdocs/core/lib/member.lib.php | 8 ++++---- htdocs/core/modules/modAdherent.class.php | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) rename htdocs/adherents/admin/{adherent.php => member.php} (100%) rename htdocs/adherents/admin/{adherent_emails.php => member_emails.php} (98%) rename htdocs/adherents/admin/{adherent_extrafields.php => member_extrafields.php} (97%) rename htdocs/adherents/admin/{adherent_type_extrafields.php => member_type_extrafields.php} (97%) diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/member.php similarity index 100% rename from htdocs/adherents/admin/adherent.php rename to htdocs/adherents/admin/member.php diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/member_emails.php similarity index 98% rename from htdocs/adherents/admin/adherent_emails.php rename to htdocs/adherents/admin/member_emails.php index e1867285930..207a913d841 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/member_emails.php @@ -24,7 +24,7 @@ */ /** - * \file htdocs/adherents/admin/adherent.php + * \file htdocs/adherents/admin/member_emails.php * \ingroup member * \brief Page to setup the module Foundation */ diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/member_extrafields.php similarity index 97% rename from htdocs/adherents/admin/adherent_extrafields.php rename to htdocs/adherents/admin/member_extrafields.php index ec3b3824db7..7f5262bc7c6 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/member_extrafields.php @@ -19,7 +19,7 @@ */ /** - * \file htdocs/adherents/admin/adherent_extrafields.php + * \file htdocs/adherents/admin/member_extrafields.php * \ingroup member * \brief Page to setup extra fields of members */ diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/member_type_extrafields.php similarity index 97% rename from htdocs/adherents/admin/adherent_type_extrafields.php rename to htdocs/adherents/admin/member_type_extrafields.php index 34175da465f..91a9233e5d0 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/member_type_extrafields.php @@ -22,7 +22,7 @@ */ /** - * \file htdocs/adherents/admin/adherent_type_extrafields.php + * \file htdocs/adherents/admin/member_type_extrafields.php * \ingroup member * \brief Page to setup extra fields of members */ diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 93378d77390..484f34c265c 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -177,12 +177,12 @@ function member_admin_prepare_head() $h = 0; $head = array(); - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member.php'; $head[$h][1] = $langs->trans("Miscellaneous"); $head[$h][2] = 'general'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_emails.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member_emails.php'; $head[$h][1] = $langs->trans("EMails"); $head[$h][2] = 'emails'; $h++; @@ -193,12 +193,12 @@ function member_admin_prepare_head() // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab complete_head_from_modules($conf, $langs, null, $head, $h, 'member_admin'); - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsMember"); $head[$h][2] = 'attributes'; $h++; - $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_type_extrafields.php'; + $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/member_type_extrafields.php'; $head[$h][1] = $langs->trans("ExtraFieldsMemberType"); $head[$h][2] = 'attributes_type'; $h++; diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php index 57ec76e319d..ec9e50f5b4e 100644 --- a/htdocs/core/modules/modAdherent.class.php +++ b/htdocs/core/modules/modAdherent.class.php @@ -66,7 +66,7 @@ class modAdherent extends DolibarrModules ); // Config pages - $this->config_page_url = array("adherent.php@adherents"); + $this->config_page_url = array("member.php@adherents"); // Dependencies $this->hidden = false; // A condition to hide module From d2f7d3064d1088e2e9c6b06e24ccfd3015d752ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 20 Mar 2021 19:09:49 +0100 Subject: [PATCH 2/2] can use $conf->member --- htdocs/core/class/conf.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php index 0eab527bc6b..56873fe5470 100644 --- a/htdocs/core/class/conf.class.php +++ b/htdocs/core/class/conf.class.php @@ -851,6 +851,10 @@ class Conf if (isset($this->projet) && !isset($this->project)) { $this->project = $this->projet; } + // member is new use, adherent is old use still initialised + if (isset($this->adherent) && !isset($this->member)) { + $this->member = $this->adherent; + } // Object $mc if (!defined('NOREQUIREMC') && !empty($this->multicompany->enabled)) {