]> git.joonet.de Git - adminer.git/commitdiff
Display login in auth form (regression)
authorJakub Vrana <jakub@vrana.cz>
Wed, 1 Dec 2010 17:44:17 +0000 (18:44 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 1 Dec 2010 17:44:17 +0000 (18:44 +0100)
adminer/include/adminer.inc.php
adminer/include/auth.inc.php
adminer/include/design.inc.php
adminer/static/editing.js
adminer/static/functions.js
editor/include/adminer.inc.php

index 97b5e1d14ad2df7b52717c1dbca1fb0fea653744..a6347bc32c30795b6bf972b45bfefb6c6e73fd34 100644 (file)
@@ -702,7 +702,7 @@ DROP PROCEDURE adminer_alter;
                                        foreach ($usernames as $username => $password) {
                                                if (isset($password)) {
                                                        if ($first) {
-                                                               echo "<p>\n";
+                                                               echo "<p onclick='eventStop(event);'>\n";
                                                                $first = false;
                                                        }
                                                        echo "<a href='" . h(auth_url($driver, $server, $username)) . "'>($drivers[$driver]) " . h($username . ($server != "" ? "@$server" : "")) . "</a><br>\n";
index d951c526923bd7a4a4468259dca966d6012be40b..b0a7034c86ff5c17ee1626ee3ac20a69dbca4846 100644 (file)
@@ -73,9 +73,8 @@ function auth_error($exception = null) {
                        }
                }
        }
-       unset($_GET["username"]); // checked in page_header() for successful login
        page_header(lang('Login'), $error, null);
-       echo "<form action='' method='post'>\n";
+       echo "<form action='' method='post' onclick='eventStop(event);'>\n";
        $adminer->loginForm();
        echo "<div>";
        hidden_fields($_POST, array("driver", "server", "username", "password", "permanent")); // expired session
index e05800912a510aa682fa53878f790483ba30a3ea..903c12fbaa2fc9878c35f7f8a06ef911966ed524 100644 (file)
@@ -32,7 +32,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
 <link rel="stylesheet" type="text/css" href="adminer.css">
 <?php } ?>
 
-<body class="<?php echo lang('ltr'); ?>"<?php if (isset($_GET["username"])) { ?> onclick="return bodyClick(event, '<?php echo js_escape(DB); ?>', '<?php echo js_escape($_GET["ns"]); ?>');"<?php } ?> onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>', '<?php echo $protocol; ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion('$protocol');"); ?>">
+<body class="<?php echo lang('ltr'); ?>" onclick="return bodyClick(event, '<?php echo js_escape(DB); ?>', '<?php echo js_escape($_GET["ns"]); ?>');" onload="bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>', '<?php echo $protocol; ?>');<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verifyVersion('$protocol');"); ?>">
 <script type="text/javascript" src="../adminer/static/functions.js"></script>
 <script type="text/javascript" src="static/editing.js"></script>
 
index 9ef3e45fdaab75f402e63ac379b8a91fb0ad3c1e..a18fa31efb6d33e60283092c35d408a633678166 100644 (file)
@@ -399,16 +399,3 @@ function schemaMouseup(ev) {
                cookie('adminer_schema=' + encodeURIComponent(s.substr(1)), 30, '; path="' + location.pathname + location.search + '"');
        }
 }
-
-
-
-/** Stop event propagation
-* @param Event
-*/
-function eventStop(event) {
-       if (event.stopPropagation) {
-               event.stopPropagation();
-       } else {
-               event.cancelBubble = true;
-       }
-}
index 96058c42b5f97511bb9af6f1cb719bf6c4864a60..d443916d6701715b55e6b6230418f15bdb6a8ed3 100644 (file)
@@ -393,3 +393,14 @@ function bodyClick(event, db, ns) {
        }
        return true;
 }
+
+/** Stop event propagation
+* @param Event
+*/
+function eventStop(event) {
+       if (event.stopPropagation) {
+               event.stopPropagation();
+       } else {
+               event.cancelBubble = true;
+       }
+}
index 85fc5a5b70aaae04707eeeeeaa80f118f6cfcf4f..07e99932e0a52d5d1685177c01b910c2fd0a2d02 100644 (file)
@@ -479,7 +479,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
                        foreach ((array) $_SESSION["pwds"]["server"][""] as $username => $password) {
                                if (isset($password)) {
                                        if ($first) {
-                                               echo "<p>\n";
+                                               echo "<p onclick='eventStop(event);'>\n";
                                                $first = false;
                                        }
                                        echo "<a href='" . h(auth_url("server", "", $username)) . "'>" . ($username != "" ? h($username) : "<i>" . lang('empty') . "</i>") . "</a><br>\n";