X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile.php;h=66343b50ff355a56c9dd8e7e264eb88b5f489357;hb=c4b453748e0affd8711c3a7a95ab6beaad2c2834;hp=ef9bec933ed25fac7487df648a7f2d2ce13b04fc;hpb=6e32823cd4907b77bbaf4af85ef6e1be986fbeef;p=platal.git diff --git a/modules/profile.php b/modules/profile.php index ef9bec9..66343b5 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -1,6 +1,6 @@ $this->make_hook('education_js', AUTH_COOKIE), 'javascript/grades.js' => $this->make_hook('grades_js', AUTH_COOKIE), 'profile/medal' => $this->make_hook('medal', AUTH_PUBLIC), + 'profile/name_info' => $this->make_hook('name_info', AUTH_PUBLIC), 'profile/orange' => $this->make_hook('p_orange', AUTH_MDP), 'profile/usage' => $this->make_hook('p_usage', AUTH_MDP), @@ -139,6 +140,19 @@ class ProfileModule extends PLModule exit; } + function handler_name_info(&$page) + { + header('Content-Type: text/html; charset=utf-8'); + $page->changeTpl('profile/name_info.tpl', SIMPLE); + $res = XDB::iterator("SELECT name, explanations, + FIND_IN_SET('public', flags) AS public, + FIND_IN_SET('has_particle', flags) AS has_particle + FROM profile_name_search_enum + WHERE NOT FIND_IN_SET('not_displayed', flags) + ORDER BY NOT FIND_IN_SET('public', flags)"); + $page->assign('types', $res); + } + function handler_networking(&$page, $mid) { $res = XDB::query("SELECT icon @@ -440,7 +454,7 @@ class ProfileModule extends PLModule function handler_ajax_edu(&$page, $eduid, $class) { header('Content-Type: text/html; charset=utf-8'); - $page->changeTpl('profile/edu.tpl', NO_SKIN); + $page->changeTpl('profile/general.edu.tpl', NO_SKIN); $res = XDB::iterator("SELECT id, field FROM profile_education_field_enum ORDER BY field");