From: Stéphane Jacob Date: Tue, 23 Dec 2008 23:54:56 +0000 (+0100) Subject: Fixes some primary education issues. X-Git-Tag: xorg/1.0.0~332^2~344^2~57 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=aafd30252e5192b9b20d4c8d1823178c7d1f64c5;p=platal.git Fixes some primary education issues. --- diff --git a/include/user.func.inc.php b/include/user.func.inc.php index 38b17ad..126569a 100644 --- a/include/user.func.inc.php +++ b/include/user.func.inc.php @@ -357,7 +357,7 @@ function &get_user_details($login, $from_uid = '', $view = 'private') LEFT JOIN profile_education_enum AS en ON (en.id = ed.eduid) LEFT JOIN profile_education_degree_enum AS d ON (d.id = ed.degreeid) LEFT JOIN profile_education_field_enum AS f ON (f.id = ed.fieldid) - WHERE uid={?} + WHERE uid = {?} AND NOT FIND_IN_SET('primary', flags) ORDER BY ed.grad_year", $uid); if (list($name, $url, $degree, $grad_year, $field, $program) = $res->next()) { diff --git a/upgrade/newdirectory-0.0.1/10_promotion.sql b/upgrade/newdirectory-0.0.1/10_promotion.sql index fb3b7b5..9eaaf28 100644 --- a/upgrade/newdirectory-0.0.1/10_promotion.sql +++ b/upgrade/newdirectory-0.0.1/10_promotion.sql @@ -1,6 +1,8 @@ INSERT INTO profile_education (id, uid, grad_year, entry_year, eduid, degreeid, flags) - SELECT 100, user_id, promo_sortie, promo, 20, 2, 'primary' - FROM auth_user_md5; + SELECT 100, u.user_id, u.promo_sortie, u.promo, e.id, d.id, 'primary' + FROM auth_user_md5 AS u + LEFT JOIN profile_education_enum AS e ON (e.abbreviation = "X") + LEFT JOIN profile_education_degree_enum AS d ON (d.degree = "Ingénieur"); CREATE TABLE profile_display ( uid INT(11) NOT NULL DEFAULT 0,