From: Martín Marrese Date: Fri, 30 Jan 2004 17:06:15 +0000 (+0000) Subject: BugFix en logout. En login se agrego la posibilidad de pasar por parametro si el... X-Git-Tag: svn_import~69 X-Git-Url: https://git.llucax.com/mecon/intranet.git/commitdiff_plain/7a6ccbd4eafbbb35a7ba5baa313f89bec7282636?ds=inline 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 --- 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 @@