]> git.joonet.de Git - adminer.git/commitdiff
Avoid <optgroup> in <datalist>
authorJakub Vrana <jakub@vrana.cz>
Tue, 25 Mar 2025 20:58:43 +0000 (21:58 +0100)
committerJakub Vrana <jakub@vrana.cz>
Tue, 25 Mar 2025 21:04:19 +0000 (22:04 +0100)
adminer/create.inc.php

index 953cd590cec768e9675440dc5895312a686d1680..075fbf33c16efdc6e309f5856df527bebfaba23e 100644 (file)
@@ -168,6 +168,9 @@ if (!$_POST) {
 }
 
 $collations = collations();
+if (is_array(reset($collations))) {
+       $collations = call_user_func_array('array_merge', array_values($collations));
+}
 $engines = $driver->engines();
 // case of engine may differ
 foreach ($engines as $engine) {
@@ -185,7 +188,7 @@ if (support("columns") || $TABLE == "") {
        echo lang('Table name') . ": <input name='name'" . ($TABLE == "" && !$_POST ? " autofocus" : "") . " data-maxlength='64' value='" . h($row["name"]) . "' autocapitalize='off'>\n";
        echo ($engines ? html_select("Engine", array("" => "(" . lang('engine') . ")") + $engines, $row["Engine"]) . on_help("event.target.value", 1) . script("qsl('select').onchange = helpClose;") . "\n" : "");
        if ($collations) {
-               echo "<datalist id='collations'>" . optionlist($collations) . "</datalist>";
+               echo "<datalist id='collations'>" . optionlist($collations) . "</datalist>\n";
                echo (preg_match("~sqlite|mssql~", JUSH) ? "" : "<input list='collations' name='Collation' value='" . h($row["Collation"]) . "' placeholder='(" . lang('collation') . ")'>");
        }
        echo "<input type='submit' value='" . lang('Save') . "'>\n";