migrate referent + profile edition
[platal.git] / hooks / tmp.inc.php
index 8cd82e1..736b998 100644 (file)
@@ -1,31 +1,51 @@
 <?php
+/***************************************************************************
+ *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  http://opensource.polytechnique.org/                                   *
+ *                                                                         *
+ *  This program is free software; you can redistribute it and/or modify   *
+ *  it under the terms of the GNU General Public License as published by   *
+ *  the Free Software Foundation; either version 2 of the License, or      *
+ *  (at your option) any later version.                                    *
+ *                                                                         *
+ *  This program is distributed in the hope that it will be useful,        *
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
+ *  GNU General Public License for more details.                           *
+ *                                                                         *
+ *  You should have received a copy of the GNU General Public License      *
+ *  along with this program; if not, write to the Free Software            *
+ *  Foundation, Inc.,                                                      *
+ *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
+ ***************************************************************************/
 
 function tmp_menu()
 {
     global $globals;
 
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   10, 'Mon profil',            'profil.php');
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   20, 'Mes contacts',          'carnet/mescontacts.php');
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   30, 'Mon carnet',            'carnet/');
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   40, 'Mon mot de passe',      'motdepassemd5.php');
-    $globals->menu->addPrivateEntry(XOM_CUSTOM,   50, 'Mes préférences',       'preferences.php');
+    $globals->menu->addPrivateEntry(XOM_CUSTOM,   10, 'Mon profil',         'profile/edit');
+    $globals->menu->addPrivateEntry(XOM_CUSTOM,   20, 'Mes contacts',       'carnet/contacts');
+    $globals->menu->addPrivateEntry(XOM_CUSTOM,   30, 'Mon carnet',         'carnet/');
+    $globals->menu->addPrivateEntry(XOM_CUSTOM,   40, 'Mon mot de passe',   'password');
+    $globals->menu->addPrivateEntry(XOM_CUSTOM,   50, 'Mes préférences',    'prefs');
 
-    $globals->menu->addPrivateEntry(XOM_GROUPS,   10, 'Trombi/Site promo',          'trombipromo.php');
-    $globals->menu->addPrivateEntry(XOM_GROUPS,   20, 'Conseil Pro.',          'referent.php');
-    $globals->menu->addPrivateEntry(XOM_GROUPS,   30, 'Groupes X',             'http://www.polytechnique.net/plan.php');
-    $globals->menu->addPrivateEntry(XOM_GROUPS,   40, 'Web Polytechnicien',    'http://www.polytechnique.net/');
+    $globals->menu->addPrivateEntry(XOM_GROUPS,   10, 'Trombi promo',       'trombi');
+    $globals->menu->addPrivateEntry(XOM_GROUPS,   20, 'Conseil Pro.',       'referent');
+    if ($globals->geoloc->use_map())
+        $globals->menu->addPrivateEntry(XOM_GROUPS,   10, 'Planisphère',    'geoloc/');
+    $globals->menu->addPrivateEntry(XOM_GROUPS,   30, 'Groupes X',          'http://www.polytechnique.net/plan.php');
 
-    $globals->menu->addPrivateEntry(XOM_INFOS,    10, 'Documentations',        'Docs/');
-    $globals->menu->addPrivateEntry(XOM_INFOS,    20, 'Nous contacter',        'Docs/NousContacter');
-    $globals->menu->addPrivateEntry(XOM_INFOS,    30, 'Emploi',                'http://www.manageurs.com/');
+    $globals->menu->addPrivateEntry(XOM_INFOS,    10, 'Documentations',     'Docs/');
+    $globals->menu->addPrivateEntry(XOM_INFOS,    20, 'Nous contacter',     'Docs/NousContacter');
+    $globals->menu->addPrivateEntry(XOM_INFOS,    30, 'Carrières',          'Docs/Emploi');
 
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    00, 'Marketing',           'marketing/');
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    10, 'Administration',      'admin/');
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    20, 'Clear cache',         'clear_all_cache.php');
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    30, 'Trackers',            'http://trackers.polytechnique.org');
-    $globals->menu->addPrivateEntry(XOM_ADMIN,    40, 'Support',             'http://support.polytechnique.org');
+    $globals->menu->addPrivateEntry(XOM_ADMIN,    00, 'Marketing',          'marketing');
+    $globals->menu->addPrivateEntry(XOM_ADMIN,    10, 'Administration',     'admin/');
+    $globals->menu->addPrivateEntry(XOM_ADMIN,    20, 'Clear cache',        'purge_cache');
+    $globals->menu->addPrivateEntry(XOM_ADMIN,    30, 'Trackers',           'http://trackers.polytechnique.org');
+    $globals->menu->addPrivateEntry(XOM_ADMIN,    40, 'Support',            'http://support.polytechnique.org');
 
-    $globals->menu->addPublicEntry(XOM_US,    00, 'Me connecter !',         'login.php');
+    $globals->menu->addPublicEntry(XOM_US,    00, 'Me connecter !',         'events');
     $globals->menu->addPublicEntry(XOM_US,    10, 'M\'inscrire',            'register/');
     $globals->menu->addPublicEntry(XOM_US,    20, 'Pourquoi m\'inscrire ?', 'Docs/PourquoiM\'Inscrire');
 
@@ -56,14 +76,14 @@ function tmp_prefs()
     $fmt2 = Session::get('mail_fmt', 'html') == 'html' ? 'texte' : 'HTML';
     return Array(
             Array(
-                'url'    => 'preferences.php?mail_fmt='.$fmt,
+                'url'    => 'prefs?mail_fmt='.$fmt,
                 'title'  => 'Recevoir les mails en format '.$fmt2,
                 'text'   => 'Tu recois les mails envoyés par le site (lettre mensuelle, carnet, ...) de préférence <strong>sous forme de '
                             .Session::get('mail_fmt', 'html').'</strong>',
                 'weight' => 80
             ),
             Array(
-                'url'    => 'preferences.php?rss='.(intval(Session::get('core_rss_hash')=='')),
+                'url'    => 'prefs?rss='.(intval(Session::get('core_rss_hash')=='')),
                 'title'  => (Session::get('core_rss_hash') ? 'Désactiver' : 'Activer').' les fils rss',
                 'text'   => 'Ceci te permet d\'utiliser les fils rss du site. Attention, désactiver puis réactiver les fils en change les URL !',
                 'weight' => 90