From: Stéphane Jacob Date: Sat, 6 Dec 2008 22:52:50 +0000 (+0100) Subject: Fixes sector and function's display in the profile edition interface. X-Git-Tag: xorg/0.10.0~6 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=01cb14cee11521b2ac79b901d42e53e3ccfe6217;p=platal.git Fixes sector and function's display in the profile edition interface. --- 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 @@