mirror of
https://github.com/vrana/adminer.git
synced 2025-08-15 11:04:02 +02:00
Simplify tablesPrint
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1135 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
@@ -415,23 +415,23 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5
|
||||
</p>
|
||||
</form>
|
||||
<?php
|
||||
$this->tablesPrint($missing);
|
||||
if ($missing != "db") {
|
||||
$table_status = table_status();
|
||||
if (!$table_status) {
|
||||
echo "<p class='message'>" . lang('No tables.') . "\n";
|
||||
} else {
|
||||
$this->tablesPrint($table_status);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function tablesPrint($missing) {
|
||||
if ($missing != "db") {
|
||||
$table_status = table_status();
|
||||
if (!$table_status) {
|
||||
echo "<p class='message'>" . lang('No tables.') . "\n";
|
||||
} else {
|
||||
echo "<p id='tables'>\n";
|
||||
foreach ($table_status as $row) {
|
||||
$name = $this->tableName($row);
|
||||
if (isset($row["Engine"]) && strlen($name)) { // ignore views and tables without name
|
||||
echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'>$name</a><br>\n";
|
||||
}
|
||||
}
|
||||
function tablesPrint($tables) {
|
||||
echo "<p id='tables'>\n";
|
||||
foreach ($tables as $row) {
|
||||
$name = $this->tableName($row);
|
||||
if (isset($row["Engine"]) && strlen($name)) { // ignore views and tables without name
|
||||
echo "<a href='" . h(ME) . 'select=' . urlencode($row["Name"]) . "'>$name</a><br>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user