From 7a6ccbd4eafbbb35a7ba5baa313f89bec7282636 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mart=C3=ADn=20Marrese?= Date: Fri, 30 Jan 2004 17:06:15 +0000 Subject: [PATCH] BugFix en logout. En login se agrego la posibilidad de pasar por parametro si el sistema esta echo en embperl, para que redireccione a Php2Embperl_Session --- sistema/www/login.php | 19 ++++++++++++------- sistema/www/logout.php | 3 +-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/sistema/www/login.php b/sistema/www/login.php index 2a3ae8b..a4965dc 100644 --- a/sistema/www/login.php +++ b/sistema/www/login.php @@ -54,9 +54,7 @@ { if(!isset($_SESSION['usuario']) ) { - if((isset($_GET['redirect']) && $_GET['redirect'] == 'sistemas') || - (isset($_POST['redirect']) && $_POST['redirect'] == 'sistemas')) - { + if (@$_REQUEST['redirect'] == 'sistemas' || @$_REQUEST['embperl']) { $m = new HTML_DietMarco('sistemas', 'Sistemas'); // $m->addTitle('Sistemas'); } @@ -85,15 +83,22 @@ } if(isset($_SESSION['usuario']) && ! @ $error && - (isset($_POST['redirect']) || isset($_GET['redirect']))) + (@$_REQUEST['redirect'])) { - @ $redirect = $_GET['redirect'].$_POST['redirect']; + $redirect = $_REQUEST['redirect']; $query = "SELECT link FROM servicio WHERE servicio = $redirect"; $link = $DB->getOne($query); - if(PEAR::isError($link)) - header('location: '.$redirect); + if(PEAR::isError($link)) { + + if (@$_REQUEST['embperl']) { + header('Location: /Php2Embperl_Session?redirect='.$redirect); + } + else { + header('Location: '.$redirect); + } + } else header('location: '.$link); } diff --git a/sistema/www/logout.php b/sistema/www/logout.php index 0aaf7b5..b7ef649 100644 --- a/sistema/www/logout.php +++ b/sistema/www/logout.php @@ -1,5 +1,4 @@ -- 2.43.0