From 6beb9b00801c3d6329b338819065a9f505a418a6 Mon Sep 17 00:00:00 2001 From: "tristan.champomier" Date: Fri, 30 Apr 2021 10:17:00 +0200 Subject: [PATCH] Added objectName(): returns current translated object name --- lib/system/system_utils/lib_system.php | 40 +++++++++++++++++--------- 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/lib/system/system_utils/lib_system.php b/lib/system/system_utils/lib_system.php index d38eb12..5456c67 100755 --- a/lib/system/system_utils/lib_system.php +++ b/lib/system/system_utils/lib_system.php @@ -35,7 +35,7 @@ if ( !defined('SYSTEM_IN') ) *

Récupere l'uid de l'utilisateur courant

* @return entier */ -function uid () +function uid() { if (isset($GLOBALS["SYSTEM_USER_SESSION"])) { @@ -55,7 +55,7 @@ function uid () *

Récupere le "First Name" de l'utilisateur courant

* @return entier */ -function userFirstName () +function userFirstName() { if (isset($GLOBALS["SYSTEM_USER_SESSION"])) { @@ -70,7 +70,7 @@ function userFirstName () *

Récupere le "Last Name" de l'utilisateur courant

* @return entier */ -function userLastName () +function userLastName() { if (isset($GLOBALS["SYSTEM_USER_SESSION"])) { @@ -85,7 +85,7 @@ function userLastName () *

Récupere le "Mail" de l'utilisateur courant

* @return entier */ -function userMail () +function userMail() { if (isset($GLOBALS["SYSTEM_USER_SESSION"])) { @@ -100,7 +100,7 @@ function userMail () *

Récupere l'identifiant de la langue courante d'affichage

* @return entier */ -function lid () +function lid() { if (isset($GLOBALS["SYSTEM_USER_SESSION"])) { @@ -120,7 +120,7 @@ function lid () *

Récépere le code de la langue courante (FR-GB) etc

* @return param code */ -function lcode () +function lcode() { if (isset($GLOBALS["SYSTEM_USER_SESSION"])) { @@ -140,7 +140,7 @@ function lcode () *

Récupere un tableau contenant les identifiants des groupes de l'utilisateurs courant

* @return tableau tableau d'entier */ -function gid () +function gid() { if (isset($GLOBALS["SYSTEM_USER_SESSION"])) { @@ -155,7 +155,7 @@ function gid () *

Récépere l'identifiant du noeud courant de navigation (endroit dans l'arbre)

* @return tableau tableau d'entier */ -function nid () +function nid() { if (isset($GLOBALS["SYSTEM_USER_SESSION"])) { @@ -175,7 +175,7 @@ function nid () *

Récépere l'identifiant du noeud d'entrée de navigation (=> noeud d'entrée dans l'arbre)

* @return tableau tableau d'entier */ -function eid () +function eid() { if (isset($GLOBALS["SYSTEM_USER_SESSION"])) { @@ -195,7 +195,7 @@ function eid () *

Récépere l'identifiant de l'objet a executer

* @return tableau tableau d'entier */ -function oid () +function oid() { if (isset($GLOBALS["SYSTEM_CONTROL"])) { @@ -215,7 +215,7 @@ function oid () *

Récépere le nom de la classe courante

* @return tableau tableau d'entier */ -function className () +function className() { if (isset($GLOBALS["SYSTEM_CONTROL"])) { @@ -230,12 +230,25 @@ function className () } } +/** +*Fonction objectName +*

Récépere le nom localisé de l'outil courant

+* @return string name +*/ +function objectName($langcode="fr") +{ + if (isset($GLOBALS["SYSTEM_CONTROL"])) + return $GLOBALS["SYSTEM_CONTROL"]->currentCoordinationObject->getName($langcode); + else + return NULL; /* Attention variable arbitraire */ +} + /** *Fonction methodName *

Récépere le nom de la methode courante

* @return tableau tableau d'entier */ -function methodName () +function methodName() { if (isset($GLOBALS["SYSTEM_CONTROL"])) { @@ -472,7 +485,8 @@ function systemPrint($data) /** * Function permettant de récupérer l'id du noeud racine de communauté -* @access private +* @access pri() +{vate * @return chaine entier noeud de configuration */ function recupCommunityByDomain($domain)