From: x2000habouzit Date: Sun, 25 Jan 2004 20:37:22 +0000 (+0000) Subject: debug, nettoyage, login et deco X-Git-Tag: xorg/old~1954 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ddeb876cb5b1f0968e1aa9725224f2e5c7fdf9fd;p=platal.git debug, nettoyage, login et deco --- diff --git a/include/auto.prepend.inc.php b/include/auto.prepend.inc.php index 0ab6d81..a6a1805 100644 --- a/include/auto.prepend.inc.php +++ b/include/auto.prepend.inc.php @@ -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="") { diff --git a/include/menu.inc.php b/include/menu.inc.php index 2dbb66f..a39d0a9 100644 --- a/include/menu.inc.php +++ b/include/menu.inc.php @@ -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( diff --git a/include/xorg.page.inc.php b/include/xorg.page.inc.php index a7fbf1a..08e24dd 100644 --- a/include/xorg.page.inc.php +++ b/include/xorg.page.inc.php @@ -1,6 +1,10 @@ _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 ""; -} ?> diff --git a/include/xorg.session.inc.php b/include/xorg.session.inc.php index 075153e..782418a 100644 --- a/include/xorg.session.inc.php +++ b/include/xorg.session.inc.php @@ -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