mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 14:17:26 +02:00
Add plugin AdminerEditorViews (fix #905)
This commit is contained in:
@@ -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 '<tr><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true));
|
||||
echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
|
||||
$val = format_number($row["Rows"]);
|
||||
|
@@ -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 '<li>';
|
||||
$name = $this->tableName($row);
|
||||
if (isset($row["Engine"]) && $name != "") { // ignore views and tables without name
|
||||
if ($name != "") { // ignore tables without name
|
||||
echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'"
|
||||
. bold($_GET["select"] == $row["Name"] || $_GET["edit"] == $row["Name"], "select")
|
||||
. " title='" . lang('Select data') . "'>$name</a>\n"
|
||||
|
Reference in New Issue
Block a user