Merge remote branch 'origin/xorg/maint' into xorg/master
[platal.git] / classes / xnet.php
index 08e6163..fe5f421 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2010 Polytechnique.org                              *
+ *  Copyright (C) 2003-2011 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -24,7 +24,7 @@ class Xnet extends Platal
     public function __construct()
     {
         parent::__construct('xnet', 'xnetgrp', 'xnetlists', 'xnetevents',
-                            'payment', 'bandeau');
+                            'payment', 'bandeau', 'xnetnl');
     }
 
     public function hook_map($name)
@@ -47,7 +47,12 @@ class Xnet extends Platal
 
     public function force_login(PlPage &$page)
     {
-        http_redirect(S::v('loginX'));
+        $redirect = S::v('loginX');
+        if (!$redirect) {
+            $page->trigError('Impossible de s\'authentifier. Problème de configuration de plat/al.');
+            return;
+        }
+        http_redirect($redirect);
     }
 }