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

Do not highlight table 0 as active

This commit is contained in:
Jakub Vrana
2025-04-09 06:27:09 +02:00
parent 88099b7dd7
commit 78d3ce830d
3 changed files with 3 additions and 1 deletions

View File

@@ -1076,6 +1076,7 @@ class Adminer {
function tablesPrint(array $tables): void {
echo "<ul id='tables'>" . script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
foreach ($tables as $table => $status) {
$table = "$table"; // do not highlight "0" as active everywhere
$name = adminer()->tableName($status);
if ($name != "") {
echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"'

View File

@@ -34,6 +34,7 @@ class AdminerMenuLinks extends Adminer\Plugin {
// this is copied from Adminer::tablesPrint()
echo "<ul id='tables'>" . Adminer\script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
foreach ($tables as $table => $status) {
$table = "$table"; // do not highlight "0" as active everywhere
$name = Adminer\adminer()->tableName($status);
if ($name != "") {
echo '<li>';