From: jakubvrana Date: Wed, 3 Jun 2009 18:35:16 +0000 (+0000) Subject: Report connection error X-Git-Tag: v3.0.0~875 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=6563b5ed1e68ea728431f72eecf67ad69b55b352;p=adminer.git Report connection error git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@650 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/include/auth.inc.php b/include/auth.inc.php index 629df69c..5e83f8af 100644 --- a/include/auth.inc.php +++ b/include/auth.inc.php @@ -1,17 +1,18 @@ getMessage() : ($dbh ? $dbh : lang('Invalid credentials.'))) : (isset($_POST["server"]) ? lang('Sessions must be enabled.') : ($_POST ? lang('Session expired, please login again.') : ""))), null); ?>
@@ -66,8 +67,9 @@ $username = &$_SESSION["usernames"][$_GET["server"]]; if (!isset($username)) { $username = $_GET["username"]; } -if (!isset($username) || !$dbh->connect($_GET["server"], $username, $_SESSION["passwords"][$_GET["server"]])) { +$dbh = (isset($username) ? connect() : ''); +unset($username); +if (is_string($dbh)) { auth_error(); exit; } -unset($username);