X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=modules%2Fprofile.php;h=99695e02629e56baf7d929a194851d56da628a4e;hb=b04882ff74e603c71accad830b26cd1c658305ea;hp=f33824c5f5ac47389922e189e9251a7488df45a0;hpb=7bff4cb031e50e345d346d2a333b5ac7a9d434fd;p=platal.git diff --git a/modules/profile.php b/modules/profile.php index f33824c..99695e0 100644 --- a/modules/profile.php +++ b/modules/profile.php @@ -38,6 +38,7 @@ class ProfileModule extends PLModule 'profile/ajax/job' => $this->make_hook('ajax_job', AUTH_COOKIE, 'user', NO_AUTH), 'profile/ajax/secteur' => $this->make_hook('ajax_secteur', AUTH_COOKIE, 'user', NO_AUTH), 'profile/ajax/skill' => $this->make_hook('ajax_skill', AUTH_COOKIE, 'user', NO_AUTH), + 'profile/ajax/searchname' => $this->make_hook('ajax_searchname', AUTH_COOKIE, 'user', NO_AUTH), 'javascript/applis.js' => $this->make_hook('applis_js', AUTH_COOKIE), 'javascript/grades.js' => $this->make_hook('grades_js', AUTH_COOKIE), 'profile/medal' => $this->make_hook('medal', AUTH_PUBLIC), @@ -278,44 +279,6 @@ class ProfileModule extends PLModule { global $globals; - // Finish registration procedure - if (Post::v('register_from_ax_question')) { - XDB::execute('UPDATE auth_user_quick - SET profile_from_ax = 1 - WHERE user_id = {?}', - S::v('uid')); - } - if (Post::v('add_to_nl')) { - require_once 'newsletter.inc.php'; - NewsLetter::subscribe(); - } - if (Post::v('add_to_ax')) { - require_once dirname(__FILE__) . '/axletter/axletter.inc.php'; - AXLetter::subscribe(); - } - if (Post::v('add_to_promo')) { - $r = XDB::query('SELECT id FROM groupex.asso WHERE diminutif = {?}', - S::v('promo')); - $asso_id = $r->fetchOneCell(); - XDB::execute('REPLACE INTO groupex.membres (uid,asso_id) - VALUES ({?}, {?})', - S::v('uid'), $asso_id); - $mmlist = new MMList(S::v('uid'), S::v('password')); - $mmlist->subscribe("promo".S::v('promo')); - } - if (Post::v('sub_ml')) { - $subs = array_keys(Post::v('sub_ml')); - $current_domain = null; - foreach ($subs as $list) { - list($sub, $domain) = explode('@', $list); - if ($domain != $current_domain) { - $current_domain = $domain; - $client = new MMList(S::v('uid'), S::v('password'), $domain); - } - $client->subscribe($sub); - } - } - // AX Synchronization require_once 'synchro_ax.inc.php'; if (is_ax_key_missing()) { @@ -465,6 +428,15 @@ class ProfileModule extends PLModule } } + function handler_ajax_searchname(&$page, $snid) + { + header('Content-Type: text/html; charset=utf-8'); + $page->changeTpl('profile/general.searchname.tpl', NO_SKIN); + $page->assign('i', $snid); + $page->assign('sn', array()); + $page->assign('newsn', true); + } + function handler_p_orange(&$page) { $page->changeTpl('profile/orange.tpl');