1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 14:46:36 +02:00

MySQL: Avoid warning on selecting tables with fulltext indexes (fix #1036)

This commit is contained in:
Jakub Vrana
2025-04-14 17:52:55 +02:00
parent 8238838285
commit 020285772b
2 changed files with 3 additions and 2 deletions

View 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

View 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" : "") . ")";
}
}