]> git.joonet.de Git - adminer.git/commitdiff
Remove nested array
authorJakub Vrana <jakub@vrana.cz>
Wed, 7 Feb 2018 11:42:46 +0000 (12:42 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 7 Feb 2018 11:42:46 +0000 (12:42 +0100)
plugins/enum-option.php

index 3e94d72ce866aada0cf490935137fc1cfc52261f..36fdd70e5efe19480e76648ec49a7c50eb540a45 100644 (file)
@@ -10,18 +10,18 @@ class AdminerEnumOption {
        
        function editInput($table, $field, $attrs, $value) {
                if ($field["type"] == "enum") {
-                       $options = array("" => array());
+                       $options = array();
                        $selected = $value;
                        if (isset($_GET["select"])) {
-                               $options[""][-1] = lang('original');
+                               $options[-1] = lang('original');
                        }
                        if ($field["null"]) {
-                               $options[""][""] = "NULL";
+                               $options[""] = "NULL";
                                if ($value === null && !isset($_GET["select"])) {
                                        $selected = "";
                                }
                        }
-                       $options[""][0] = lang('empty');
+                       $options[0] = lang('empty');
                        preg_match_all("~'((?:[^']|'')*)'~", $field["length"], $matches);
                        foreach ($matches[1] as $i => $val) {
                                $val = stripcslashes(str_replace("''", "'", $val));