debug, nettoyage, login et deco
authorx2000habouzit <x2000habouzit>
Sun, 25 Jan 2004 20:37:22 +0000 (20:37 +0000)
committerx2000habouzit <x2000habouzit>
Sun, 25 Jan 2004 20:37:22 +0000 (20:37 +0000)
include/auto.prepend.inc.php
include/menu.inc.php
include/xorg.page.inc.php
include/xorg.session.inc.php

index 0ab6d81..a6a1805 100644 (file)
@@ -21,7 +21,7 @@ function _new_page($type, $tpl_name, $tpl_head, $min_auth, $admin=false) {
     $page->assign('xorg_tpl', $tpl_name);
 
     $page->compile_check=true;
-//    $page->caching=true; // XXX  note sure for now
+    $page->caching=true;
 }
 
 function new_skinned_page($tpl_name, $min_auth, $tpl_head="") {
index 2dbb66f..a39d0a9 100644 (file)
@@ -2,7 +2,7 @@
 
 if(logged()) {
     $menu = Array(
-        0 => Array( 'Page d\'accueil' => '###url###' ),
+        0 => Array( 'Page d\'accueil' => 'login.php' ),
         'Personnaliser' => Array(
             'Mes emails' => '###url###' ,
             'Mon profil' => '###url###' ,
@@ -33,7 +33,7 @@ if(logged()) {
     );
 
     if(identified()) {
-        $array = array_merge( Array('Déconnexion' => '###url###'),  $menu[0] );
+        $menu[0] = array_merge( Array('Déconnexion' => 'deconnexion.php'),  $menu[0] );
     }
 
     if(has_perms()) {
@@ -51,7 +51,7 @@ if(logged()) {
 } else {
     $menu = Array(
         'Polytechniciens' => Array(
-            'Me connecter !' => "###url###",
+            'Me connecter !' => "login.php",
             'M\'inscrire' => "###url###"
         ),
         'Visiteurs' => Array(
index a7fbf1a..08e24dd 100644 (file)
@@ -1,6 +1,10 @@
 <?php
 require("diogenes.core.page.inc.php");
 
+function dynamic($param, $content, &$smarty) {
+    return $content;
+}
+
 class XorgPage extends DiogenesCorePage {
   var $_page_type;
   var $_tpl;
@@ -12,6 +16,7 @@ class XorgPage extends DiogenesCorePage {
     $this->_tpl = $tpl;
 
     $this->DiogenesCorePage();
+    $this->register_block('dynamic', 'dynamic', false);
 
     // if necessary, construct new session
     if (!session_is_registered('session')) {
@@ -118,37 +123,4 @@ class XorgAdmin extends XorgAuth
   }
 }
 
-
-/** ajoute le nb de ../ qvb
- * Cette fonction recherche login.php dans les chemins donnés par INCLUDE_PATH
- * et renvoie l'url avec le nombre de .. qvb
- * @param $param URL relative (à la page web)
- * @return URL absolue (au site web)
- * @see getphoto.php
- * @see ax/PasswordPromptScreen.inc
- * @see include/footer.inc.php
- * @see include/form_data_maj.inc.php
- * @see include/header1.inc.php
- * @see include/header2.inc.php
- * @see include/header_all.inc.php
- * @see include/header_logged.inc.php
- * @see include/passwordpromptscreen.inc.php
- * @see include/passwordpromptscreenlogged.inc.php
- * @see listes/index.php
- * @see mescontacts.php
- */
-function xorg_func_url($params)
-{
-  extract($params);
-
-  if (empty($rel))
-    return;
-
-  $chemins = Array('.', '..', '/');
-  foreach ($chemins as $ch) {
-    if (file_exists("$ch/login.php") || file_exists("$ch/public/login.php"))
-      return "$ch/$rel";
-  }
-  return "";
-}
 ?>
index 075153e..782418a 100644 (file)
@@ -111,7 +111,9 @@ class XorgSession extends DiogenesCoreSession {
     global $failed_ORGaccess,$site_dev;
 
     if(isset($_COOKIE['ORGaccess']) and isset($_COOKIE['ORGlogin']) and !isset($failed_ORGaccess)) {
-      $page->display("passwordpromptscreenlogged.tpl");
+      $page->assign("xorg_head", "password_prompt_logged.head.tpl");
+      $page->assign("xorg_tpl", "password_prompt_logged.tpl");
+      $page->display();
     } else {
       if (isset($_COOKIE['ORGlogin'])) {
         $pre = strtok($_COOKIE['ORGlogin'],".");
@@ -126,7 +128,9 @@ class XorgSession extends DiogenesCoreSession {
         }
         $page->assign('prenom',$prenom);
       }
-      $page->display("passwordpromptscreen.tpl");
+      $page->assign("xorg_head", "password_prompt.head.tpl");
+      $page->assign("xorg_tpl", "password_prompt.tpl");
+      $page->display();
     }
     //    $page->assign('challenge',$this->challenge);
     exit;
@@ -134,7 +138,6 @@ class XorgSession extends DiogenesCoreSession {
 
 }
 
-
 /** verifie si un utilisateur a les droits pour voir une page
  ** si ce n'est pas le cas, on affiche une erreur
  * @return void