diff --git a/adminer/foreign.inc.php b/adminer/foreign.inc.php index c01856c2..3685d057 100644 --- a/adminer/foreign.inc.php +++ b/adminer/foreign.inc.php @@ -85,8 +85,8 @@ if (support("scheme")) { } echo lang('DB') . ": " . html_select("db", $dbs, $row["db"] != "" ? $row["db"] : $_GET["db"], $onchange); } +echo input_hidden("change-js"); ?> -
" . checkbox("fields[$i][null]", 1, $field["null"], "", "", "block", "label-null"); diff --git a/adminer/include/html.inc.php b/adminer/include/html.inc.php index 14b10e58..51d65c29 100644 --- a/adminer/include/html.inc.php +++ b/adminer/include/html.inc.php @@ -25,13 +25,22 @@ function nonce() { return ' nonce="' . get_nonce() . '"'; } +/** Get +* @param string +* @param string +* @return string HTML +*/ +function input_hidden($name, $value = "") { + return "\n"; +} + /** Get * @param string token to use instead of global $token * @return string HTML */ function input_token($special = "") { global $token; - return "\n"; + return input_hidden("token", ($special ?: $token)); } /** Get a target="_blank" attribute @@ -201,7 +210,7 @@ function hidden_fields($process, $ignore = array(), $prefix = '') { hidden_fields($val, array(), $key); } else { $return = true; - echo ''; + echo input_hidden(($prefix ? $prefix . "[$key]" : $key), $val); } } } @@ -212,9 +221,9 @@ function hidden_fields($process, $ignore = array(), $prefix = '') { * @return null */ function hidden_fields_get() { - echo (sid() ? '' : ''); - echo (SERVER !== null ? '' : ""); - echo ''; + echo (sid() ? input_hidden(session_name(), session_id()) : ''); + echo (SERVER !== null ? input_hidden(DRIVER, SERVER) : ""); + echo input_hidden("username", $_GET["username"]); } /** Print enum input field @@ -520,8 +529,8 @@ function edit_form($table, $fields, $row, $update) { if (isset($_GET["select"])) { hidden_fields(array("check" => (array) $_POST["check"], "clone" => $_POST["clone"], "all" => $_POST["all"])); } - echo "\n"; - echo "\n"; + echo input_hidden("referer", (isset($_POST["referer"]) ? $_POST["referer"] : $_SERVER["HTTP_REFERER"])); + echo input_hidden("save", 1); echo input_token(); echo "\n"; } diff --git a/adminer/privileges.inc.php b/adminer/privileges.inc.php index d3cd6142..975548ad 100644 --- a/adminer/privileges.inc.php +++ b/adminer/privileges.inc.php @@ -14,8 +14,8 @@ if (!$result) { echo " |