1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 17:14:07 +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

@@ -8,7 +8,10 @@ foreach ($fields as $name => $field) {
}
}
if ($_POST && !$error && !isset($_GET["select"])) {
$location = ($_POST["insert"] ? $_SERVER["REQUEST_URI"] : $SELF . (isset($_GET["default"]) ? "table=" : "select=") . urlencode($_GET["edit"])); // "insert" to continue edit or insert
$location = ($_POST["insert"] // continue edit or insert
? $_SERVER["REQUEST_URI"]
: ME . (isset($_GET["default"]) ? "table=" : "select=") . urlencode($_GET["edit"]) //! append &set converted to &where
);
$set = array();
foreach ($fields as $name => $field) {
$val = process_input($field);
@@ -70,9 +73,10 @@ if ($fields) {
echo "<table cellspacing='0'>\n";
foreach ($fields as $name => $field) {
echo "<tr><th>" . $adminer->fieldName($field);
$default = $_GET["set"][bracket_escape($name)];
$value = (isset($row)
? (strlen($row[$name]) && ($field["type"] == "enum" || $field["type"] == "set") ? intval($row[$name]) : $row[$name])
: ($_POST["clone"] && $field["auto_increment"] ? "" : (isset($_GET["select"]) ? false : $field["default"]))
: ($_POST["clone"] && $field["auto_increment"] ? "" : (isset($_GET["select"]) ? false : (isset($default) ? $default : $field["default"])))
);
if (!$_POST["save"] && is_string($value)) {
$value = $adminer->editVal($value, $field);