add name edition in profile
[platal.git] / modules / profile.php
index 1346856..99695e0 100644 (file)
@@ -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),
@@ -427,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');