X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile%2Fmentor.inc.php;h=3a842c6ea07a733b4ec1551591ca18706eaa9847;hb=0b53817f618e590864806947320868e11a355497;hp=b34b6e84c8e1c4da9a9baa2b9ef3f4b47b385fa5;hpb=245923e335d0da5bec9495991a7846be9f0563ab;p=platal.git diff --git a/modules/profile/mentor.inc.php b/modules/profile/mentor.inc.php index b34b6e8..3a842c6 100644 --- a/modules/profile/mentor.inc.php +++ b/modules/profile/mentor.inc.php @@ -1,6 +1,6 @@ pid()); $this->values['expertise'] = null; } else { - XDB::execute("REPLACE INTO profile_mentor (pid, expertise) - VALUES ({?}, {?})", + XDB::execute('INSERT INTO profile_mentor (pid, expertise) + VALUES ({?}, {?}) + ON DUPLICATE KEY UPDATE expertise = VALUES(expertise)', $this->pid(), $expertise); $this->values['expertise'] = $expertise; } @@ -174,9 +175,9 @@ class ProfilePageMentor extends ProfilePage public function _prepare(PlPage &$page, $id) { - $page->assign('countryList', XDB::iterator("SELECT iso_3166_1_a2, countryFR + $page->assign('countryList', XDB::iterator("SELECT iso_3166_1_a2, country FROM geoloc_countries - ORDER BY countryFR")); + ORDER BY country")); $page->assign('hrpid', $this->profile->hrpid); } }