pending commit, finished during MQ/S download ...
[platal.git] / include / xorg.inc.php
index 43dc4f6..cb86440 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /***************************************************************************
- *  Copyright (C) 2003-2004 Polytechnique.org                              *
+ *  Copyright (C) 2003-2006 Polytechnique.org                              *
  *  http://opensource.polytechnique.org/                                   *
  *                                                                         *
  *  This program is free software; you can redistribute it and/or modify   *
@@ -29,8 +29,10 @@ XorgSession::init();
 
 function _new_page($type, $tpl_name, $min_auth, $admin=false)
 {
-    global $page,$globals;
+    global $page, $globals;
     require_once("xorg/page.inc.php");
+    if ($min_auth == AUTH_PUBLIC && Env::get('force_login') == '1')
+        $min_auth = AUTH_COOKIE;
     if (!empty($admin)) {
         $page = new XorgAdmin($tpl_name, $type);
     } else switch($min_auth) {
@@ -50,6 +52,10 @@ function _new_page($type, $tpl_name, $min_auth, $admin=false)
 }
 
 // }}}
+function new_identification_page()
+{
+    _new_page(SKINNED, '', AUTH_MDP);
+}
 // {{{ function new_skinned_page()
 
 function new_skinned_page($tpl_name, $min_auth)