]> git.joonet.de Git - adminer.git/commitdiff
Respect empty tableName in tablesPrint
authorJakub Vrana <jakub@vrana.cz>
Thu, 8 Feb 2018 09:35:54 +0000 (10:35 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 8 Feb 2018 09:35:54 +0000 (10:35 +0100)
adminer/include/adminer.inc.php

index 78fc2a675319bf425889df7b906c433e50c396c4..f05b3cbb695cf4dff0e3e1b37889f2e481e970a2 100644 (file)
@@ -1013,14 +1013,16 @@ bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\\d\\.?\\d).*~s'
        function tablesPrint($tables) {
                echo "<ul id='tables'>" . script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
                foreach ($tables as $table => $status) {
-                       echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
                        $name = $this->tableName($status);
-                       echo (support("table") || support("indexes")
-                               ? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
-                                       . bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : "structure"))
-                                       . " title='" . lang('Show structure') . "'>$name</a>"
-                               : "<span>$name</span>"
-                       ) . "\n";
+                       if ($name != "") {
+                               echo '<li><a href="' . h(ME) . 'select=' . urlencode($table) . '"' . bold($_GET["select"] == $table || $_GET["edit"] == $table, "select") . ">" . lang('select') . "</a> ";
+                               echo (support("table") || support("indexes")
+                                       ? '<a href="' . h(ME) . 'table=' . urlencode($table) . '"'
+                                               . bold(in_array($table, array($_GET["table"], $_GET["create"], $_GET["indexes"], $_GET["foreign"], $_GET["trigger"])), (is_view($status) ? "view" : "structure"))
+                                               . " title='" . lang('Show structure') . "'>$name</a>"
+                                       : "<span>$name</span>"
+                               ) . "\n";
+                       }
                }
                echo "</ul>\n";
        }