Merge commit 'origin/fusionax' into account
[platal.git] / modules / profile / mentor.inc.php
index f553609..a9690fd 100644 (file)
@@ -78,9 +78,9 @@ class ProfileCountry implements ProfileSetting
         $success = true;
         if (is_null($value)) {
             $value = array();
-            $res = XDB::iterRow("SELECT  m.country, p.pays
+            $res = XDB::iterRow("SELECT  m.country, gc.countryFR
                                    FROM  profile_mentor_country AS m
-                             INNER JOIN  geoloc_pays            AS p ON (m.country = p.a2)
+                             INNER JOIN  geoloc_countries       AS gc ON (m.country = gc.iso_3166_1_a2)
                                   WHERE  m.uid = {?}",
                                 $page->pid());
             while (list($id, $name) = $res->next()) {
@@ -153,6 +153,10 @@ class ProfileMentor extends ProfilePage
     {
         $page->assign('secteurs_sel', XDB::iterator("SELECT  id, name AS label
                                                        FROM  profile_job_sector_enum"));
+
+        $page->assign('countryList', XDB::iterator("SELECT  iso_3166_1_a2, countryFR
+                                                      FROM  geoloc_countries
+                                                  ORDER BY  countryFR"));
     }
 }