Adds job address to the job interface, makes more uniform address related names.
[platal.git] / modules / profile / mentor.inc.php
index 5de721d..4fc7b94 100644 (file)
@@ -19,7 +19,7 @@
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-class ProfileSecteurs implements ProfileSetting
+class ProfileSectors implements ProfileSetting
 {
     public function value(ProfilePage &$page, $field, $value, &$success)
     {
@@ -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 = {?}",
                                 S::i('uid'));
             while (list($id, $name) = $res->next()) {
@@ -118,7 +118,7 @@ class ProfileMentor extends ProfilePage
     {
         parent::__construct($wiz);
         $this->settings['expertise'] = null;
-        $this->settings['secteurs'] = new ProfileSecteurs();
+        $this->settings['sectors'] = new ProfileSectors();
         $this->settings['countries'] = new ProfileCountry();
     }
 
@@ -151,8 +151,8 @@ class ProfileMentor extends ProfilePage
 
     public function _prepare(PlPage &$page, $id)
     {
-        $page->assign('secteurs_sel', XDB::iterator("SELECT  id, name AS label
-                                                       FROM  profile_job_sector_enum"));
+        $page->assign('sectors', XDB::iterator("SELECT  id, name
+                                                  FROM  profile_job_sector_enum"));
 
         $page->assign('countryList', XDB::iterator("SELECT  iso_3166_1_a2, countryFR
                                                       FROM  geoloc_countries