Fix uninitialized variables
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@914 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
c64c4fd14d
commit
d145471973
|
@ -90,6 +90,11 @@ while ($row = $result->fetch_assoc()) {
|
|||
}
|
||||
$result->free();
|
||||
|
||||
$row = array(
|
||||
"Engine" => $_COOKIE["adminer_engine"],
|
||||
"fields" => array(array("field" => "")),
|
||||
"partition_names" => array(""),
|
||||
);
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
if ($row["auto_increment_col"]) {
|
||||
|
@ -116,12 +121,6 @@ if ($_POST) {
|
|||
$result->free();
|
||||
$row["partition_names"][] = "";
|
||||
}
|
||||
} else {
|
||||
$row = array(
|
||||
"Engine" => $_COOKIE["adminer_engine"],
|
||||
"fields" => array(array("field" => "")),
|
||||
"partition_names" => array(""),
|
||||
);
|
||||
}
|
||||
$collations = collations();
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["change"] && !$_POST["change-
|
|||
|
||||
page_header(lang('Foreign key'), $error, array("table" => $_GET["foreign"]), $_GET["foreign"]);
|
||||
|
||||
$row = array("table" => $_GET["foreign"], "source" => array(""));
|
||||
if ($_POST) {
|
||||
$row = $_POST;
|
||||
ksort($row["source"]);
|
||||
|
@ -33,8 +34,6 @@ if ($_POST) {
|
|||
$foreign_keys = foreign_keys($_GET["foreign"]);
|
||||
$row = $foreign_keys[$_GET["name"]];
|
||||
$row["source"][] = "";
|
||||
} else {
|
||||
$row = array("table" => $_GET["foreign"], "source" => array(""));
|
||||
}
|
||||
|
||||
$source = get_vals("SHOW COLUMNS FROM " . idf_escape($_GET["foreign"])); //! no text and blob
|
||||
|
|
|
@ -42,7 +42,7 @@ function auth_error($exception = null) {
|
|||
unset($_SESSION["usernames"][$_GET["server"]]);
|
||||
page_header(lang('Login'), (isset($username) ? htmlspecialchars($exception ? $exception->getMessage() : (is_string($dbh) ? $dbh : lang('Invalid credentials.'))) : (isset($_POST["server"]) ? lang('Sessions must be enabled.') : ($_POST ? lang('Session expired, please login again.') : ""))), null);
|
||||
echo "<form action='' method='post'>\n";
|
||||
$adminer->loginForm($login);
|
||||
$adminer->loginForm($username);
|
||||
echo "<p>\n";
|
||||
hidden_fields($_POST, $ignore); // expired session
|
||||
foreach ($_FILES as $key => $val) {
|
||||
|
|
|
@ -82,6 +82,7 @@ include "./include/editing.inc.php";
|
|||
include "./include/export.inc.php";
|
||||
|
||||
$confirm = " onclick=\"return confirm('" . lang('Are you sure?') . "');\"";
|
||||
$enum_length = '\'(?:\'\'|[^\'\\\\]+|\\\\.)*\'|"(?:""|[^"\\\\]+|\\\\.)*"';
|
||||
$token = $_SESSION["tokens"][$_GET["server"]];
|
||||
$error = ($_POST
|
||||
? ($_POST["token"] == $token ? "" : lang('Invalid CSRF token. Send the form again.'))
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
include "./include/bootstrap.inc.php";
|
||||
|
||||
$enum_length = '\'(?:\'\'|[^\'\\\\]+|\\\\.)*\'|"(?:""|[^"\\\\]+|\\\\.)*"';
|
||||
$inout = array("IN", "OUT", "INOUT");
|
||||
|
||||
if (isset($_GET["download"])) {
|
||||
|
|
Loading…
Reference in a new issue