diff --git a/editor/db.inc.php b/editor/db.inc.php index 276b99f4..1eb64524 100644 --- a/editor/db.inc.php +++ b/editor/db.inc.php @@ -20,7 +20,7 @@ if ($adminer->homepage()) { foreach (table_status() as $table => $row) { $name = $adminer->tableName($row); - if (isset($row["Engine"]) && $name != "") { + if ($name != "") { echo '' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true)); echo "$name"; $val = format_number($row["Rows"]); diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 6518919c..a4df17e3 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -90,7 +90,10 @@ class Adminer { } function tableName($tableStatus) { - return h($tableStatus["Comment"] != "" ? $tableStatus["Comment"] : $tableStatus["Name"]); + return h(isset($tableStatus["Engine"]) + ? ($tableStatus["Comment"] != "" ? $tableStatus["Comment"] : $tableStatus["Name"]) + : "" // ignore views + ); } function fieldName($field, $order = 0) { @@ -632,7 +635,7 @@ qsl('div').onclick = whisperClick;", "") foreach ($tables as $row) { echo '
  • '; $name = $this->tableName($row); - if (isset($row["Engine"]) && $name != "") { // ignore views and tables without name + if ($name != "") { // ignore tables without name echo "$name\n" diff --git a/plugins/editor-views.php b/plugins/editor-views.php new file mode 100644 index 00000000..2570b528 --- /dev/null +++ b/plugins/editor-views.php @@ -0,0 +1,14 @@ +