Fixes sector and function's display in the profile edition interface.
authorStéphane Jacob <jacou@melix.net>
Sat, 6 Dec 2008 22:52:50 +0000 (23:52 +0100)
committerStéphane Jacob <jacou@melix.net>
Mon, 8 Dec 2008 20:16:50 +0000 (21:16 +0100)
modules/profile/jobs.inc.php

index 5d95ae4..7983f8f 100644 (file)
@@ -295,11 +295,13 @@ class ProfileJobs extends ProfilePage
         require_once "emails.combobox.inc.php";
         fill_email_combobox($page);
 
-        $page->assign('secteurs', XDB::iterator("SELECT  id, name AS label
-                                                   FROM  profile_job_sector_enum"));
-        $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, name AS label
+                             FROM  profile_job_sector_enum");
+        $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());
 
         $res = XDB::iterator("SELECT  id, name
                                 FROM  profile_corps_enum