From 01cb14cee11521b2ac79b901d42e53e3ccfe6217 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sat, 6 Dec 2008 23:52:50 +0100 Subject: [PATCH] Fixes sector and function's display in the profile edition interface. --- modules/profile/jobs.inc.php | 12 +++++++----- templates/profile/jobs.job.tpl | 8 ++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/modules/profile/jobs.inc.php b/modules/profile/jobs.inc.php index ad1e921..eee6b5b 100644 --- a/modules/profile/jobs.inc.php +++ b/modules/profile/jobs.inc.php @@ -204,11 +204,13 @@ class ProfileJobs extends ProfilePage public function _prepare(PlPage &$page, $id) { - $page->assign('secteurs', XDB::iterator("SELECT id, label - FROM emploi_secteur")); - $page->assign('fonctions', XDB::iterator("SELECT id, fonction_fr, FIND_IN_SET('titre', flags) AS title - FROM fonctions_def - ORDER BY id")); + $res = XDB::query("SELECT id, label + FROM emploi_secteur"); + $page->assign('secteurs', $res->fetchAllAssoc()); + $res = XDB::query("SELECT id, fonction_fr, FIND_IN_SET('titre', flags) AS title + FROM fonctions_def + ORDER BY id"); + $page->assign('fonctions', $res->fetchAllAssoc()); } } diff --git a/templates/profile/jobs.job.tpl b/templates/profile/jobs.job.tpl index 366e804..ace46af 100644 --- a/templates/profile/jobs.job.tpl +++ b/templates/profile/jobs.job.tpl @@ -61,11 +61,11 @@ @@ -88,7 +88,7 @@ -- 2.1.4