]> git.joonet.de Git - adminer.git/commitdiff
Display notification about performing action after relogin
authorJakub Vrana <jakub@vrana.cz>
Thu, 8 Feb 2018 15:49:56 +0000 (16:49 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 8 Feb 2018 15:49:56 +0000 (16:49 +0100)
adminer/include/auth.inc.php
adminer/include/functions.inc.php
adminer/lang/cs.inc.php
adminer/lang/xx.inc.php
changes.txt

index fc2934672174075bc5b5872c51af94ead0841bfe..f18fa4cc5ef3686831fa261ca66303aa1847a77b 100644 (file)
@@ -138,10 +138,12 @@ function auth_error($error) {
        cookie("adminer_key", ($_COOKIE["adminer_key"] ? $_COOKIE["adminer_key"] : rand_string()), $params["lifetime"]);
        page_header(lang('Login'), $error, null);
        echo "<form action='' method='post'>\n";
-       $adminer->loginForm();
        echo "<div>";
-       hidden_fields($_POST, array("auth")); // expired session
+       if (hidden_fields($_POST, array("auth"))) { // expired session
+               echo "<p class='message'>" . lang('The action will be performed after successful login with the same credentials.') . "\n";
+       }
        echo "</div>\n";
+       $adminer->loginForm();
        echo "</form>\n";
        page_footer("auth");
        exit;
index 588e8abc738be8a23af57f1678576e346e75f6a3..debce630f63d0d798c45936498e261200b6229cd 100644 (file)
@@ -848,9 +848,10 @@ function friendly_url($val) {
 /** Print hidden fields
 * @param array
 * @param array
-* @return null
+* @return bool
 */
 function hidden_fields($process, $ignore = array()) {
+       $return = false;
        while (list($key, $val) = each($process)) {
                if (!in_array($key, $ignore)) {
                        if (is_array($val)) {
@@ -858,10 +859,12 @@ function hidden_fields($process, $ignore = array()) {
                                        $process[$key . "[$k]"] = $v;
                                }
                        } else {
+                               $return = true;
                                echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">';
                        }
                }
        }
+       return $return;
 }
 
 /** Print hidden fields for GET forms
index 0665e97e0b52cc351793194888b3ec89c78eac68..b6ae0af9024a67f600399ba135f174682663eeb9 100644 (file)
@@ -23,6 +23,7 @@ $translations = array(
        'Connecting to privileged ports is not allowed.' => 'Připojování k privilegovaným portům není povoleno.',
        'Session support must be enabled.' => 'Session proměnné musí být povolené.',
        'Session expired, please login again.' => 'Session vypršela, přihlašte se prosím znovu.',
+       'The action will be performed after successful login with the same credentials.' => 'Akce bude provedena po úspěšném přihlášení se stejnými přihlašovacími údaji.',
        '%s version: %s through PHP extension %s' => 'Verze %s: %s přes PHP rozšíření %s',
        'Refresh' => 'Obnovit',
        
index 716a3dac968a2e352791cd39c1c3c4cf0daa0a76..bb0b79d191dabd0c21d5ef8fc9a47c5b7329e83b 100644 (file)
@@ -23,6 +23,7 @@ $translations = array(
        'Connecting to privileged ports is not allowed.' => 'Xx.',
        'Session support must be enabled.' => 'Xx.',
        'Session expired, please login again.' => 'Xx.',
+       'The action will be performed after successful login with the same credentials.' => 'Xx.',
        '%s version: %s through PHP extension %s' => '%s xx: %s xx %s',
        'Refresh' => 'Xx',
        
index b2900cb8398371795cf2812c0386e0999873f131..7c4c7426f0ff20c79e8d28d2fe481a36076282a5 100644 (file)
@@ -1,6 +1,7 @@
 Adminer 4.6.1-dev:
 Sticky position of table actions
 Speed up rendering of long tables (regression from 4.4.0)
+Display notification about performing action after relogin
 Add system tables help links
 MySQL: Support non-utf8 charset in search in column
 MySQL: Support geometry in MySQL 8 (bug #574)