diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php
index 6e4d0d45..5c2ca5fd 100644
--- a/adminer/include/functions.inc.php
+++ b/adminer/include/functions.inc.php
@@ -437,8 +437,9 @@ function input($field, $value, $function) {
$first++;
}
$onchange = ($first ? " onchange=\"var f = this.form['function[" . addcslashes($name, "\r\n'\\") . "]']; if ($first > f.selectedIndex) f.selectedIndex = $first;\"" : "");
+ $attrs = " name='fields[$name]'$onchange";
echo (count($functions) > 1 ? html_select("function[$name]", $functions, !isset($function) || in_array($function, $functions) ? $function : "") : nbsp(reset($functions))) . '
';
- $input = $adminer->editInput($_GET["edit"], $field, " name='fields[$name]'$onchange", $value); // usage in call is without a table
+ $input = $adminer->editInput($_GET["edit"], $field, $attrs, $value); // usage in call is without a table
if (strlen($input)) {
echo $input;
} elseif ($field["type"] == "set") { //! 64 bits
@@ -449,13 +450,13 @@ function input($field, $value, $function) {
echo " ';
}
} elseif (ereg('binary|blob', $field["type"]) && ini_get("file_uploads")) {
- echo "";
+ echo "";
} elseif (ereg('text|blob', $field["type"])) {
- echo "';
+ echo "';
} else {
// int(3) is only a display hint
$maxlength = (!ereg('int', $field["type"]) && preg_match('~^([0-9]+)(,([0-9]+))?$~', $field["length"], $match) ? ($match[1] + ($match[3] ? 1 : 0) + ($match[2] && !$field["unsigned"] ? 1 : 0)) : ($types[$field["type"]] ? $types[$field["type"]] + ($field["unsigned"] ? 0 : 1) : 0));
- echo " 20 ? " size='40'" : "") . "$onchange>";
+ echo " 20 ? " size='40'" : "") . "$attrs>";
}
}
}
@@ -478,7 +479,7 @@ function process_input($field) {
} elseif ($field["type"] == "set") {
return array_sum((array) $value);
} elseif (ereg('binary|blob', $field["type"]) && ini_get("file_uploads")) {
- $file = get_file($idf);
+ $file = get_file("fields-$idf");
if (!is_string($file)) {
return false; //! report errors
}
|