From 6847d89364d774bd016183f3c906e538e45672f9 Mon Sep 17 00:00:00 2001 From: jakubvrana Date: Thu, 26 Jul 2007 08:35:01 +0000 Subject: [PATCH] Display NULL for all fields git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@259 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- editing.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editing.inc.php b/editing.inc.php index 8aac7cb5..34fe6ab3 100644 --- a/editing.inc.php +++ b/editing.inc.php @@ -32,7 +32,7 @@ function input($name, $field, $value) { } else { echo ''; } - if ($field["null"] && preg_match('~char|text|set|binary|blob~', $field["type"])) { + if ($field["null"] && $field["type"] != "enum") { $id = "null-$name"; echo ''; } @@ -42,7 +42,7 @@ function process_input($name, $field) { global $mysql; $name = bracket_escape($name); $value = $_POST["fields"][$name]; - if (preg_match('~char|text|set|binary|blob~', $field["type"]) ? $_POST["null"][$name] : !strlen($value)) { + if ($field["type"] != "enum" ? $_POST["null"][$name] : !strlen($value)) { return "NULL"; } elseif ($field["type"] == "enum") { return (isset($_GET["default"]) ? "'" . $mysql->escape_string($value) . "'" : intval($value));