1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-15 19:13:59 +02:00

Function verify_version doesn't use version parameter

Don't preselect first option in foreign key edit
Prefill insert by foreign key searches
REQUEST_URI is used earlier
Change variable $SELF to constant ME
Denote required fields in Editor


git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@944 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-07-30 08:12:54 +00:00
parent 940d5ecbd3
commit 98507da3ea
27 changed files with 100 additions and 100 deletions

View File

@@ -285,7 +285,7 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
}
function editFunctions($field) {
return array("");
return array($field["null"] || $field["auto_increment"] ? "" : "*");
}
function editInput($table, $field, $attrs, $value) {
@@ -296,11 +296,8 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
$id = idf_escape($foreign_key["target"][0]);
$name = $this->rowDescription($foreign_key["table"]);
if (strlen($name) && $dbh->result($dbh->query("SELECT COUNT(*) FROM " . idf_escape($foreign_key["table"]))) <= 1000) { // optionlist with more than 1000 options would be too big
$return = array();
$return = array("" => "");
$result = $dbh->query("SELECT $id, $name FROM " . idf_escape($foreign_key["table"]) . " ORDER BY 2");
if ($field["null"] || !$result->num_rows) { // empty <select> is not HTML-valid
$return[""] = "";
}
while ($row = $result->fetch_row()) {
$return[$row[0]] = $row[1];
}
@@ -327,7 +324,6 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
}
function navigation($missing) {
global $SELF;
if ($missing != "auth") {
?>
<form action="" method="post">
@@ -346,7 +342,7 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
foreach ($table_status as $row) {
$name = $this->tableName($row);
if (isset($row["Engine"]) && strlen($name)) { // ignore views and tables without name
echo "<a href='" . h($SELF) . 'select=' . urlencode($row["Name"]) . "'>$name</a><br>\n";
echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'>$name</a><br>\n";
}
}
}