1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-13 18:14:07 +02:00

Move SimpleDB fields computation

This commit is contained in:
Jakub Vrana
2013-07-06 22:22:13 -07:00
parent d17b17e515
commit 1060a3f9eb
2 changed files with 15 additions and 17 deletions

View File

@@ -285,7 +285,20 @@ if (isset($_GET["simpledb"])) {
}
function fields($table) {
return array();
$return = array();
foreach ((array) $_POST["field_keys"] as $key => $val) {
if ($val != "") {
$_POST["fields"][bracket_escape($val)] = $_POST["field_vals"][$key];
}
}
foreach ((array) $_POST["fields"] as $key => $val) {
$name = bracket_escape($key, 1); // 1 - back
$return[$name] = array("field" => $name, "privileges" => array("insert" => 1, "update" => 1));
if (isset($_POST["function"][$key])) {
$return[$name]["null"] = true;
}
}
return $return;
}
function foreign_keys($table) {