1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-09 16:17:48 +02:00

Driver specific view detection

This commit is contained in:
Jakub Vrana
2010-05-27 13:31:08 +02:00
parent fe3d395912
commit da6f1f850b
9 changed files with 30 additions and 7 deletions

View File

@@ -72,7 +72,7 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
$table = (DB == "" || in_array($row["Name"], (array) $_POST["tables"]));
$data = (DB == "" || in_array($row["Name"], (array) $_POST["data"]));
if ($table || $data) {
if (isset($row["Engine"])) {
if (!is_view($row)) {
if ($ext == "tar") {
ob_start();
}
@@ -197,7 +197,7 @@ if (DB != "") {
$prefix = ereg_replace("_.*", "", $name);
$checked = ($TABLE == "" || $TABLE == (substr($TABLE, -1) == "%" ? "$prefix%" : $name)); //! % may be part of table name
$print = "<tr><td>" . checkbox("tables[]", $name, $checked, $name, "formUncheck('check-tables');");
if (eregi("view", $row["Engine"])) {
if (is_view($row)) {
$views .= "$print\n";
} else {
echo "$print<td align='right'><label>" . ($row["Engine"] == "InnoDB" && $row["Rows"] ? "~ " : "") . $row["Rows"] . checkbox("data[]", $name, $checked, "", "formUncheck('check-data');") . "</label>\n";