From 1948d9b030fa3bfcf77d4c3fa16bceb9a6e46b14 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Wed, 21 Jun 2006 16:08:59 +0000 Subject: [PATCH] improvement suggested by Sebastian --- libraries/auth/http.auth.lib.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libraries/auth/http.auth.lib.php b/libraries/auth/http.auth.lib.php index 601040f06..2f201f413 100644 --- a/libraries/auth/http.auth.lib.php +++ b/libraries/auth/http.auth.lib.php @@ -188,17 +188,9 @@ function PMA_auth_set_user() */ function PMA_auth_fails() { - if (PMA_DBI_getError() && $GLOBALS['errno'] != 1045) { - $conn_error = PMA_sanitize(PMA_DBI_getError()); - header('Content-Type: text/html; charset=' . $GLOBALS['charset']); - $page_title = 'phpMyAdmin ' . PMA_VERSION; - require './libraries/header_meta_style.inc.php'; - - echo '

' . $GLOBALS['strError'] . '

' . "\n"; - echo $conn_error . '
' . "\n"; - // no footer here, would not make sense - echo '' . "\n"; - // exit immediately to avoid warnings from the db library + $error = PMA_DBI_getError(); + if ($error && $GLOBALS['errno'] != 1045) { + PMA_sendHeaderLocation('error.php?error=' . urlencode($error)); exit; } else { PMA_auth();