X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fsearch.php;h=9f42273f0e5cde80f970993a67b4c5a381e2aa92;hb=4c64e1e7926e82b917c4bc7bf47e51475d44d04a;hp=fd61899e8b40c97ae3b0ba1b8e34c3b6cf427b1f;hpb=a7de4ef724d1a3b0bf978a50ce7cc9d23412c7a0;p=platal.git diff --git a/modules/search.php b/modules/search.php index fd61899..9f42273 100644 --- a/modules/search.php +++ b/modules/search.php @@ -26,8 +26,8 @@ class SearchModule extends PLModule return array( 'search' => $this->make_hook('quick', AUTH_PUBLIC), 'search/adv' => $this->make_hook('advanced', AUTH_COOKIE), - 'search/ajax/region' => $this->make_hook('region', AUTH_COOKIE, '', NO_AUTH), - 'search/ajax/grade' => $this->make_hook('grade', AUTH_COOKIE, '', NO_AUTH), + 'search/ajax/region' => $this->make_hook('region', AUTH_COOKIE, 'user', NO_AUTH), + 'search/ajax/grade' => $this->make_hook('grade', AUTH_COOKIE, 'user', NO_AUTH), 'advanced_search.php' => $this->make_hook('redir_advanced', AUTH_PUBLIC), ); } @@ -90,8 +90,11 @@ class SearchModule extends PLModule $page->assign('formulaire',1); $page->assign('choix_nats', - XDB::iterator('SELECT a2 AS id,IF(nat=\'\',pays,nat) AS text - FROM geoloc_pays ORDER BY text')); + XDB::iterator('SELECT g.a2 AS id, IF(nat=\'\', g.pays, g.nat) AS text + FROM geoloc_pays AS g + INNER JOIN auth_user_md5 AS u ON (u.nationalite = g.a2) + GROUP BY g.a2 + ORDER BY text')); $page->assign('choix_postes', XDB::iterator('SELECT id,fonction_fr FROM fonctions_def ORDER BY fonction_fr')); @@ -252,7 +255,7 @@ class SearchModule extends PLModule function handler_region(&$page, $country = null) { - header('Content-Type: text/html; charset="iso-8859-15"'); + header('Content-Type: text/html; charset="UTF-8"'); require_once("geoloc.inc.php"); $page->ChangeTpl('search/adv.region.form.tpl', NO_SKIN); $page->assign('region', ""); @@ -261,7 +264,7 @@ class SearchModule extends PLModule function handler_grade(&$page, $school = null) { - header('Content-Type: text/html; charset="iso-8859-15"'); + header('Content-Type: text/html; charset="UTF-8"'); $page->ChangeTpl('search/adv.grade.form.tpl', NO_SKIN); $page->assign('grade', ''); $this->get_diplomas($school);