Can add image in announce on x.net.
[platal.git] / classes / platal.php
index 24a0066..cec37f2 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   *
@@ -51,6 +51,11 @@ class Platal
             $this->__mods[$module] = $m = PLModule::factory($module);
             $this->__hooks += $m->handlers();
         }
+
+        global $globals;
+        if ($globals->mode == '') {
+            pl_redirect('index.html');
+        }
     }
 
     public function pl_self($n = null)
@@ -266,6 +271,7 @@ class Platal
 
     public function force_login(PlatalPage &$page)
     {
+        header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
         if (S::logged()) {
             $page->changeTpl('core/password_prompt_logged.tpl');
             $page->addJsLink('do_challenge_response_logged.js');