]> git.joonet.de Git - adminer.git/commitdiff
Move \n to loginFormField
authorJakub Vrana <jakub@vrana.cz>
Tue, 25 Feb 2025 16:36:37 +0000 (17:36 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 26 Feb 2025 11:20:36 +0000 (12:20 +0100)
adminer/include/adminer.inc.php
editor/include/adminer.inc.php
plugins/login-otp.php

index 6fe2601e363a23e950b29bf32a47d6e9f0f1d5b5..645e71c821cdf9ad98b7865af40f57c641ccfb80 100644 (file)
@@ -119,11 +119,11 @@ class Adminer {
        function loginForm() {
                global $drivers;
                echo "<table class='layout'>\n";
-               echo $this->loginFormField('driver', '<tr><th>' . lang('System') . '<td>', html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);") . "\n");
-               echo $this->loginFormField('server', '<tr><th>' . lang('Server') . '<td>', '<input name="auth[server]" value="' . h(SERVER) . '" title="hostname[:port]" placeholder="localhost" autocapitalize="off">' . "\n");
+               echo $this->loginFormField('driver', '<tr><th>' . lang('System') . '<td>', html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);"));
+               echo $this->loginFormField('server', '<tr><th>' . lang('Server') . '<td>', '<input name="auth[server]" value="' . h(SERVER) . '" title="hostname[:port]" placeholder="localhost" autocapitalize="off">');
                echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input name="auth[username]" id="username" autofocus value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">' . script("qs('#username').form['auth[driver]'].onchange();"));
-               echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">' . "\n");
-               echo $this->loginFormField('db', '<tr><th>' . lang('Database') . '<td>', '<input name="auth[db]" value="' . h($_GET["db"]) . '" autocapitalize="off">' . "\n");
+               echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">');
+               echo $this->loginFormField('db', '<tr><th>' . lang('Database') . '<td>', '<input name="auth[db]" value="' . h($_GET["db"]) . '" autocapitalize="off">');
                echo "</table>\n";
                echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
                echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
@@ -136,7 +136,7 @@ class Adminer {
        * @return string
        */
        function loginFormField($name, $heading, $value) {
-               return $heading . $value;
+               return $heading . $value . "\n";
        }
 
        /** Authorize the user
index 69e1ff2981a7daccf6477da0a4b5094e1a8fe21e..c7833b6bf5b667fb8131096ec8b8ab0c15129d93 100644 (file)
@@ -73,14 +73,14 @@ class Adminer {
        function loginForm() {
                echo "<table class='layout'>\n";
                echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" autofocus value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">');
-               echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">' . "\n");
+               echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">');
                echo "</table>\n";
                echo "<p><input type='submit' value='" . lang('Login') . "'>\n";
                echo checkbox("auth[permanent]", 1, $_COOKIE["adminer_permanent"], lang('Permanent login')) . "\n";
        }
 
        function loginFormField($name, $heading, $value) {
-               return $heading . $value;
+               return $heading . $value . "\n";
        }
 
        function login($login, $password) {
index 759cdd86464e9ce6c72dedb56548e6ad56deeb9f..7000df9e1f1b33fb14d35802f349a10e9d2a127a 100644 (file)
@@ -22,7 +22,7 @@ class AdminerLoginOtp {
 
        function loginFormField($name, $heading, $value) {
                if ($name == 'password') {
-                       return $heading . $value
+                       return $heading . $value . "\n"
                                . "<tr><th><acronym title='One Time Password' lang='en'>OTP</acronym>"
                                . "<td><input type='number' name='auth[otp]' value='" . h($_SESSION["otp"]) . "' size='6' autocomplete='one-time-code' inputmode='numeric' maxlength='6' pattern='\d{6}'>\n"
                        ;