diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 529f24d0..f835ab5a 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -371,7 +371,7 @@ class Adminer { if ($field["null"] || isset($_GET["default"])) { array_unshift($return, "NULL"); } - return (isset($_GET["select"]) ? array("orig" => lang('original')) : array()) + $return; + return $return; } /** Get options to display edit field diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index aeda28de..587b5abc 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -303,8 +303,8 @@ function input($field, $value, $function) { echo ' '; } } else { - $functions = $adminer->editFunctions($field); - $first = array_search("", $functions); + $functions = (isset($_GET["select"]) ? array("orig" => lang('original')) : array()) + $adminer->editFunctions($field); + $first = array_search("", $functions) + (isset($_GET["select"]) ? 1 : 0); $onchange = ($first ? ' onchange="var f = this.form[\'function[' . addcslashes($name, "\r\n'\\") . ']\']; if (' . $first . ' > f.selectedIndex) f.selectedIndex = ' . $first . ';"' : ''); echo (count($functions) > 1 ? '' : " ") . ''; $input = $adminer->editInput($_GET["edit"], $field, ' name="fields[' . $name . ']"' . $onchange, $value); // usage in call is without a table @@ -315,12 +315,12 @@ function input($field, $value, $function) { foreach ($matches[1] as $i => $val) { $val = stripcslashes(str_replace("''", "'", $val)); $checked = (is_int($value) ? ($value >> $i) & 1 : in_array($val, explode(",", $value), true)); - echo ' '; + echo ' '; } } elseif (strpos($field["type"], "text") !== false) { - echo ''; + echo ''; } elseif (ereg('binary|blob', $field["type"])) { - echo (ini_get("file_uploads") ? '' : lang('File uploads are disabled.')); + echo (ini_get("file_uploads") ? '" : lang('File uploads are disabled.')); } 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)); diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 81262ccc..38bba839 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -285,7 +285,7 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5 } function editFunctions($field) { - return (isset($_GET["select"]) ? array("orig" => lang('original')) : array()) + array(""); + return array(""); } function editInput($table, $field, $attrs, $value) {