Adds a networking address field in advanced search form
[platal.git] / include / xnet / page.inc.php
index 2c38d17..c9ec661 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2007 Polytechnique.org                              *
+ *  Copyright (C) 2003-2008 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -89,14 +89,14 @@ class XnetPage extends PlatalPage
         $menu["no_title"]   = $sub;
 
         $perms = S::v('perms');
+        $dim = $globals->asso('diminutif');
         if (S::logged() && $globals->asso()) {
             $sub = array();
-            $dim = $globals->asso('diminutif');
             $sub['présentation'] = "login/$dim/";
             if ($perms->hasFlag('groupannu')) {
                 $sub['annuaire du groupe'] = "$dim/annuaire";
                 $sub['trombinoscope'] = "$dim/trombi";
-                $sub['carte'] = "$dim/geoloc";
+                $sub['planisphère'] = "$dim/geoloc";
             }
             if ($perms->hasFlag('groupmember')) {
                 if ($globals->asso('forum')) {
@@ -114,7 +114,7 @@ class XnetPage extends PlatalPage
             $menu[$globals->asso('nom')] = $sub;
         }
 
-        if (is_object($perms) && $perms->hasFlag('groupadmin')) {
+        if ($globals->asso() && is_object($perms) && $perms->hasFlag('groupadmin')) {
             $sub = array();
             $sub['modifier l\'accueil'] = "$dim/edit";
             $sub['gérer les annonces'] = "$dim/admin/announces";