X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile.php;h=4209f19faf3b6473dea8bea65f13468ac695472d;hb=8231a8595422f734d315d64ce36fef0dbebc0abf;hp=3ba8612d7d838b387c5c6cb1ace685c2746a0708;hpb=26ba053e75092d038f571b77eaf3005509da0648;p=platal.git diff --git a/modules/profile.php b/modules/profile.php index 3ba8612..4209f19 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -56,18 +56,18 @@ class ProfileModule extends PLModule 'groupes-x/logo' => $this->make_hook('xnetlogo', AUTH_PUBLIC), 'vcard' => $this->make_hook('vcard', AUTH_COOKIE, 'user', NO_HTTPS), - 'admin/binets' => $this->make_hook('admin_binets', AUTH_MDP, 'admin'), - 'admin/medals' => $this->make_hook('admin_medals', AUTH_MDP, 'admin'), - 'admin/education' => $this->make_hook('admin_education', AUTH_MDP, 'admin'), - 'admin/education_field' => $this->make_hook('admin_education_field', AUTH_MDP, 'admin'), - 'admin/education_degree' => $this->make_hook('admin_education_degree', AUTH_MDP, 'admin'), - 'admin/education_degree_set' => $this->make_hook('admin_education_degree_set', AUTH_MDP, 'admin'), - 'admin/sections' => $this->make_hook('admin_sections', AUTH_MDP, 'admin'), - 'admin/networking' => $this->make_hook('admin_networking', AUTH_MDP, 'admin'), - 'admin/trombino' => $this->make_hook('admin_trombino', AUTH_MDP, 'admin'), - 'admin/corps_enum' => $this->make_hook('admin_corps_enum', AUTH_MDP, 'admin'), - 'admin/corps_rank' => $this->make_hook('admin_corps_rank', AUTH_MDP, 'admin'), - 'admin/names' => $this->make_hook('admin_names', AUTH_MDP, 'admin'), + 'admin/binets' => $this->make_hook('admin_binets', AUTH_MDP, 'admin'), + 'admin/medals' => $this->make_hook('admin_medals', AUTH_MDP, 'admin'), + 'admin/education' => $this->make_hook('admin_education', AUTH_MDP, 'admin'), + 'admin/education_field' => $this->make_hook('admin_education_field', AUTH_MDP, 'admin'), + 'admin/education_degree' => $this->make_hook('admin_education_degree', AUTH_MDP, 'admin'), + 'admin/education_degree_set' => $this->make_hook('admin_education_degree_set', AUTH_MDP, 'admin'), + 'admin/sections' => $this->make_hook('admin_sections', AUTH_MDP, 'admin'), + 'admin/networking' => $this->make_hook('admin_networking', AUTH_MDP, 'admin'), + 'admin/trombino' => $this->make_hook('admin_trombino', AUTH_MDP, 'admin'), + 'admin/corps_enum' => $this->make_hook('admin_corps_enum', AUTH_MDP, 'admin'), + 'admin/corps_rank' => $this->make_hook('admin_corps_rank', AUTH_MDP, 'admin'), + 'admin/names' => $this->make_hook('admin_names', AUTH_MDP, 'admin'), ); } @@ -293,7 +293,6 @@ class ProfileModule extends PLModule $page->assign('view', $view); $page->assign('logged', S::logged()); - $page->addJsLink('close_on_esc.js'); header('Last-Modified: ' . date('r', strtotime($profile->last_change))); } @@ -333,7 +332,6 @@ class ProfileModule extends PLModule $page->addJsLink('education.js', false); /* dynamic content */ $page->addJsLink('grades.js', false); /* dynamic content */ $page->addJsLink('profile.js'); - $page->addJsLink('jquery.autocomplete.js'); $wiz = new PlWizard('Profil', PlPage::getCoreTpl('plwizard.tpl'), true, true, false); $wiz->addUserData('profile', $profile); $wiz->addUserData('owner', $profile->owner()); @@ -429,12 +427,12 @@ class ProfileModule extends PLModule require_once "education.func.inc.php"; } - function handler_ajax_medal($page, $id) + function handler_ajax_medal($page, $i, $id) { pl_content_headers("text/html"); $page->changeTpl('profile/deco.medal.tpl', NO_SKIN); - $page->assign('id', $id); - $page->assign('medal', array('valid' => 0, 'grade' => 0)); + $page->assign('id', $i); + $page->assign('medal', array('id' => $id, 'grade' => 0, 'valid' => 0)); } function handler_ajax_job($page, $id) @@ -524,8 +522,6 @@ class ProfileModule extends PLModule LEFT JOIN geoloc_countries AS gc ON (m.country = gc.iso_3166_1_a2) WHERE pid = {?}", $pf->id()); $page->assign('pays', $res->fetchColumn()); - - $page->addJsLink('close_on_esc.js'); } function handler_ref_country($page) @@ -671,7 +667,7 @@ class ProfileModule extends PLModule } $vcard = new VCard(); - $vcard->addProfile(Profile::get($x)); + $vcard->addProfile(Profile::get($x, Profile::FETCH_ALL)); $vcard->show(); }