mirror of
https://github.com/vrana/adminer.git
synced 2025-08-18 12:21:24 +02:00
Display notification about performing action after relogin
This commit is contained in:
@@ -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;
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user