Include columns list in clone
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1072 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
9903946717
commit
45e0de7b2c
|
@ -62,12 +62,12 @@ if ($_POST && !$error) {
|
||||||
foreach ($columns as $name => $val) { //! should check also for edit or insert privileges
|
foreach ($columns as $name => $val) { //! should check also for edit or insert privileges
|
||||||
$val = process_input($fields[$name]);
|
$val = process_input($fields[$name]);
|
||||||
if ($_POST["clone"]) {
|
if ($_POST["clone"]) {
|
||||||
$set[] = ($val !== false ? $val : idf_escape($name));
|
$set[idf_escape($name)] = ($val !== false ? $val : idf_escape($name));
|
||||||
} elseif ($val !== false) {
|
} elseif ($val !== false) {
|
||||||
$set[] = idf_escape($name) . " = $val";
|
$set[] = idf_escape($name) . " = $val";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$command .= ($_POST["clone"] ? "\nSELECT " . implode(", ", $set) . "\nFROM " . idf_escape($TABLE) : " SET\n" . implode(",\n", $set));
|
$command .= ($_POST["clone"] ? " (" . implode(", ", array_keys($set)) . ")\nSELECT " . implode(", ", $set) . "\nFROM " . idf_escape($TABLE) : " SET\n" . implode(",\n", $set));
|
||||||
}
|
}
|
||||||
if ($_POST["delete"] || $set) {
|
if ($_POST["delete"] || $set) {
|
||||||
if ($_POST["all"] || ($primary === array() && $_POST["check"])) {
|
if ($_POST["all"] || ($primary === array() && $_POST["check"])) {
|
||||||
|
|
Loading…
Reference in a new issue