Allow access to list trombi on xnet
[platal.git] / modules / core.php
index 0fec9e2..81dc615 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
+ *  Copyright (C) 2003-2007 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -43,16 +43,25 @@ class CoreModule extends PLModule
 
     function handler_403(&$page)
     {
+        global $globals;
         header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
-        $page->changeTpl('core/403.tpl');
+        if ($globals->asso()) {
+            new_skinned_page('core/403.tpl');
+        } else {
+            $page->changeTpl('core/403.tpl');
+        }
     }
 
     function handler_404(&$page)
     {
-        global $platal;
+        global $globals, $platal;
         header($_SERVER['SERVER_PROTOCOL'] . ' 404 Not Found');
+        if ($globals->asso()) {
+            new_group_open_page('core/404.tpl');
+        } else {
+            $page->changeTpl('core/404.tpl');
+        }
         $page->assign('near', $platal->near_hook());
-        $page->changeTpl('core/404.tpl');
     }
 
     function handler_favicon(&$page)