1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 00:54:08 +02:00

Use adminer() instead of $adminer

This commit is contained in:
Jakub Vrana
2025-03-29 20:56:19 +01:00
parent 87f149ce1d
commit 845445baad
29 changed files with 184 additions and 218 deletions

View File

@@ -7,7 +7,7 @@ if (!$fields) {
$error = error() ?: lang('No tables.');
}
$table_status = table_status1($TABLE);
$name = $adminer->tableName($table_status);
$name = adminer()->tableName($table_status);
page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'materialized view' ? lang('Materialized view') : lang('View') : lang('Table')) . ": " . ($name != "" ? $name : h($TABLE)), $error);
@@ -15,7 +15,7 @@ $rights = array();
foreach ($fields as $key => $field) {
$rights += $field["privileges"];
}
$adminer->selectLinks($table_status, (isset($rights["insert"]) || !support("table") ? "" : null));
adminer()->selectLinks($table_status, (isset($rights["insert"]) || !support("table") ? "" : null));
$comment = $table_status["Comment"];
if ($comment != "") {
@@ -23,14 +23,14 @@ if ($comment != "") {
}
if ($fields) {
$adminer->tableStructurePrint($fields, $table_status);
adminer()->tableStructurePrint($fields, $table_status);
}
if (support("indexes") && $driver->supportsIndex($table_status)) {
echo "<h3 id='indexes'>" . lang('Indexes') . "</h3>\n";
$indexes = indexes($TABLE);
if ($indexes) {
$adminer->tableIndexesPrint($indexes);
adminer()->tableIndexesPrint($indexes);
}
echo '<p class="links"><a href="' . h(ME) . 'indexes=' . urlencode($TABLE) . '">' . lang('Alter indexes') . "</a>\n";
}