]> git.joonet.de Git - adminer.git/commitdiff
Check numeric table names after error
authorJakub Vrana <jakub@vrana.cz>
Fri, 28 Mar 2025 19:45:27 +0000 (20:45 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 28 Mar 2025 19:45:27 +0000 (20:45 +0100)
adminer/db.inc.php

index 8b273fb320b07c197c7697c17fa56400d4c3643f..3494d700636fe567ab245dd606f042a9c414766a 100644 (file)
@@ -93,7 +93,7 @@ if ($adminer->homepage()) {
                        foreach ($tables_list as $name => $type) {
                                $view = ($type !== null && !preg_match('~table|sequence~i', $type));
                                $id = h("Table-" . $name);
-                               echo '<tr><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "", "", $id);
+                               echo '<tr><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array("$name", $tables_views, true), "", "", "", $id); // "$name" to check numeric table names
                                echo '<th>' . (support("table") || support("indexes") ? "<a href='" . h(ME) . "table=" . urlencode($name) . "' title='" . lang('Show structure') . "' id='$id'>" . h($name) . '</a>' : h($name));
                                if ($view) {
                                        echo '<td colspan="6"><a href="' . h(ME) . "view=" . urlencode($name) . '" title="' . lang('Alter view') . '">' . (preg_match('~materialized~i', $type) ? lang('Materialized view') : lang('View')) . '</a>';