improvement suggested by Sebastian

This commit is contained in:
Marc Delisle
2006-06-21 16:08:59 +00:00
parent f101e3b85b
commit 1948d9b030

View File

@@ -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 '<div class="error"><h1>' . $GLOBALS['strError'] . '</h1>' . "\n";
echo $conn_error . '</div>' . "\n";
// no footer here, would not make sense
echo '</body></html>' . "\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();