From a09584ae4ba93a995db3780870cf83b071d47f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:46:47 +0200 Subject: [PATCH 1/2] The method _load_ldap_dn() cannot be called... The method _load_ldap_dn() cannot be called from this context as it is declared private in class AdherentType. --- htdocs/adherents/class/adherent_type.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index c310bb18627..d51bbfef28a 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -462,7 +462,7 @@ class AdherentType extends CommonObject return ''; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * @@ -472,7 +472,7 @@ class AdherentType extends CommonObject * 2=Return key only (uid=qqq) * @return string DN */ - private function _load_ldap_dn($info, $mode = 0) + public function _load_ldap_dn($info, $mode = 0) { // phpcs:enable global $conf; From a368a6a43ed8b59570289ac855976f5012783e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 19 May 2019 09:51:54 +0200 Subject: [PATCH 2/2] Update adherent_type.class.php --- htdocs/adherents/class/adherent_type.class.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index d51bbfef28a..5e7847efa82 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -65,7 +65,7 @@ class AdherentType extends CommonObject * @var string Adherent type label */ public $label; - + /** * @var string Adherent type nature */ @@ -410,7 +410,7 @@ class AdherentType extends CommonObject return -1; } } - + /** * Return translated label by the nature of a adherent (physical or moral) * @@ -422,7 +422,7 @@ class AdherentType extends CommonObject global $langs; if ($morphy == 'phy') { return $langs->trans("Physical"); } elseif ($morphy == 'mor') { return $langs->trans("Moral"); } - else return $langs->trans("Physical & Morale"); + else return $langs->trans("Physical & Morale"); //return $morphy; } @@ -462,7 +462,8 @@ class AdherentType extends CommonObject return ''; } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Retourne chaine DN complete dans l'annuaire LDAP pour l'objet * @@ -485,12 +486,13 @@ class AdherentType extends CommonObject // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore /** * Initialize the info array (array of LDAP values) that will be used to call LDAP functions * * @return array Tableau info des attributs */ - private function _load_ldap_info() + public function _load_ldap_info() { // phpcs:enable global $conf,$langs;