X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;ds=sidebyside;f=include%2Feducation.func.inc.php;h=fce66c3d3e69e4f268bbca1b38ac9ec3e5a3238f;hb=bc0276a2d79d88a56656514fe24bd427c0ef3b88;hp=857774eeb743d81978e6c69eb0824dfba54deba1;hpb=e8a898662eeafa5201082067a7aac46573884ebb;p=platal.git
diff --git a/include/education.func.inc.php b/include/education.func.inc.php
index 857774e..fce66c3 100644
--- a/include/education.func.inc.php
+++ b/include/education.func.inc.php
@@ -1,6 +1,6 @@
';
- $res = XDB::iterator("SELECT e.id AS id, e.name AS name, g.pays AS country
+ $html = '';
+ $res = XDB::iterator("SELECT e.id AS id, gc.country,
+ IF(CHAR_LENGTH(e.name) > 76, e.abbreviation, e.name) AS name
FROM profile_education_enum AS e
- LEFT JOIN geoloc_pays AS g ON (e.country = g.a2)
+ LEFT JOIN geoloc_countries AS gc ON (e.country = gc.iso_3166_1_a2)
WHERE EXISTS (SELECT *
FROM profile_education_degree AS d
- WHERE e.id = d.eduid)
- ORDER BY g.pays, e.name");
+ WHERE e.id = d.eduid) AND e.name != {?}
+ ORDER BY gc.country, e.name",
+ Profile::EDU_X);
$country = "";
while ($arr_edu = $res->next()) {
if ($arr_edu["country"] != $country) {
+ if ($country) {
+ $html .= '';
+ }
$country = $arr_edu["country"];
- $html .= "