From daa66175c727af26bbf0082a54d1f2048f405527 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Sun, 7 Dec 2008 16:10:48 +0100 Subject: [PATCH 1/1] Fixes sector and function's display in the profile edition interface (Ooops). --- modules/profile.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/profile.php b/modules/profile.php index 7a52138..7ef48ad 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -429,11 +429,13 @@ class ProfileModule extends PLModule $page->assign('i', $id); $page->assign('job', array()); $page->assign('new', true); - $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()); } function handler_ajax_secteur(&$page, $id, $sect, $ssect = -1) -- 2.1.4