]> git.joonet.de Git - adminer.git/commitdiff
MySQL: Avoid warning on selecting tables with fulltext indexes (fix #1036)
authorJakub Vrana <jakub@vrana.cz>
Mon, 14 Apr 2025 15:52:55 +0000 (17:52 +0200)
committerJakub Vrana <jakub@vrana.cz>
Mon, 14 Apr 2025 15:52:55 +0000 (17:52 +0200)
CHANGELOG.md
adminer/include/adminer.inc.php

index aaf26b58b68c57c2549fe444c6d512e957a7246d..63fb9edc2a08e50e60dbc53a17ade31ee88bc9ba 100644 (file)
@@ -1,4 +1,5 @@
 ## Adminer dev
+- MySQL: Avoid warning on selecting tables with fulltext indexes (bug #1036)
 - PostgreSQL: Creating partitioned tables (bug #1031)
 - PostgreSQL: Move partitioned tables from table list to parent table
 - Designs: adminer.css with 'prefers-color-scheme: dark' don't disable dark mode
index a4ebbf50a9456d01d812b4c09e3c30c10e1e8a06..a8f89080e45a1221684ec5c4e725aeb979488f03 100644 (file)
@@ -400,7 +400,7 @@ class Adminer {
                foreach ($indexes as $i => $index) {
                        if ($index["type"] == "FULLTEXT") {
                                echo "<div>(<i>" . implode("</i>, <i>", array_map('Adminer\h', $index["columns"])) . "</i>) AGAINST";
-                               echo " <input type='search' name='fulltext[$i]' value='" . h($_GET["fulltext"][$i]) . "'>";
+                               echo " <input type='search' name='fulltext[$i]' value='" . h(idx($_GET["fulltext"], $i)) . "'>";
                                echo script("qsl('input').oninput = selectFieldChange;", "");
                                echo checkbox("boolean[$i]", 1, isset($_GET["boolean"][$i]), "BOOL");
                                echo "</div>\n";
@@ -538,7 +538,7 @@ class Adminer {
        function selectSearchProcess(array $fields, array $indexes): array {
                $return = array();
                foreach ($indexes as $i => $index) {
-                       if ($index["type"] == "FULLTEXT" && $_GET["fulltext"][$i] != "") {
+                       if ($index["type"] == "FULLTEXT" && idx($_GET["fulltext"], $i) != "") {
                                $return[] = "MATCH (" . implode(", ", array_map('Adminer\idf_escape', $index["columns"])) . ") AGAINST (" . q($_GET["fulltext"][$i]) . (isset($_GET["boolean"][$i]) ? " IN BOOLEAN MODE" : "") . ")";
                        }
                }