diff --git a/Controleur/ControleurRoles.php b/Controleur/ControleurRoles.php index 8d878a84..172f63ac 100644 --- a/Controleur/ControleurRoles.php +++ b/Controleur/ControleurRoles.php @@ -15,7 +15,7 @@ class ControleurRoles extends Controleur } public function index() { - $profil = $this->utilisateur->getListeProfilCode(); + $profil = $this->utilisateur->getListeProfilCodeRh(); $this->genererVue(array('profil' => $profil)); } diff --git a/Modele/Utilisateur.php b/Modele/Utilisateur.php index 4a4a3d43..c7babc5f 100644 --- a/Modele/Utilisateur.php +++ b/Modele/Utilisateur.php @@ -662,4 +662,18 @@ class Utilisateur extends Modele { $email, $hash, $codeLangue, $actVisible, $AffectionVisible, $user)); } + public function getListeProfilCodeRh() + { + if (est_anglophone()) + { + $sql = 'SELECT codeProfil AS `code`, CONCAT(libelleEng, " ( ", codeProfil, " )") AS libelle FROM c_profil WHERE (codeSociete=?) ORDER BY libelleEng'; + } + else + { + $sql = 'SELECT codeProfil AS `code`, CONCAT(libelle, " ( ", codeProfil, " )") AS libelle FROM c_profil WHERE (codeSociete=?) ORDER BY libelle'; + } + + $liste = $this->executerRequete($sql, array($_SESSION['codeSociete'])); + return $liste->fetchAll(PDO::FETCH_ASSOC); + } } \ No newline at end of file