From df0c4bba956fba4b67de309b651d28c60e79e1cb Mon Sep 17 00:00:00 2001
From: jakubvrana
name(); ?>
@@ -470,28 +470,27 @@ class Adminer {
' . lang('Create new table') . "\n"; + } } } /** Prints table list in menu - * @param string can be "db" if there is no database selected + * @param array * @return null */ - function tablesPrint($missing) { - global $connection; - if ($missing != "db" && strlen(DB) && $connection->select_db(DB)) { - $result = $connection->query("SHOW TABLES"); - if (!$result->num_rows) { - echo "
\n";
- while ($row = $result->fetch_row()) {
- echo '' . lang('select') . ' ';
- echo '' . $this->tableName(array("Name" => $row[0])) . "
\n"; //! Adminer::tableName may work with full table status
- }
- }
- echo '
' . lang('Create new table') . "\n"; + function tablesPrint($tables) { + echo "
\n";
+ foreach ($tables as $table) {
+ echo '' . lang('select') . ' ';
+ echo '' . $this->tableName(array("Name" => $table)) . "
\n"; //! Adminer::tableName may work with full table status
}
}
diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php
index 52e0d570..97fc74da 100644
--- a/editor/include/adminer.inc.php
+++ b/editor/include/adminer.inc.php
@@ -415,23 +415,23 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
\n";
- foreach ($table_status as $row) {
- $name = $this->tableName($row);
- if (isset($row["Engine"]) && strlen($name)) { // ignore views and tables without name
- echo "$name
\n";
- }
- }
+ function tablesPrint($tables) {
+ echo "
\n";
+ foreach ($tables as $row) {
+ $name = $this->tableName($row);
+ if (isset($row["Engine"]) && strlen($name)) { // ignore views and tables without name
+ echo "$name
\n";
}
}
}
--
2.39.5