1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-06 14:46:36 +02:00

Remove unused HTLM attribute

This commit is contained in:
Jakub Vrana
2025-02-23 11:42:05 +01:00
parent 1838df9465
commit 7ece69a8c4
25 changed files with 37 additions and 37 deletions

View File

@@ -64,7 +64,7 @@ if (!$error && $_POST) {
<form action="" method="post">
<?php
if ($in) {
echo "<table cellspacing='0' class='layout'>\n";
echo "<table class='layout'>\n";
foreach ($in as $key) {
$field = $routine["fields"][$key];
$name = $field["field"];

View File

@@ -186,7 +186,7 @@ foreach ($engines as $engine) {
<?php if (support("columns")) { ?>
<div class="scrollable">
<table cellspacing="0" id="edit-fields" class="nowrap">
<table id="edit-fields" class="nowrap">
<?php
edit_fields($row["fields"], $collations, "TABLE", $foreign_keys);
?>
@@ -221,7 +221,7 @@ if (support("partitioning")) {
<?php echo "<select name='partition_by'>" . optionlist(array("" => "") + $partition_by, $row["partition_by"]) . "</select>" . on_help("getTarget(event).value.replace(/./, 'PARTITION BY \$&')", 1) . script("qsl('select').onchange = partitionByChange;"); ?>
(<input name="partition" value="<?php echo h($row["partition"]); ?>">)
<?php echo lang('Partitions'); ?>: <input type="number" name="partitions" class="size<?php echo ($partition_table || !$row["partition_by"] ? " hidden" : ""); ?>" value="<?php echo h($row["partitions"]); ?>">
<table cellspacing="0" id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
<table id="partition-table"<?php echo ($partition_table ? "" : " class='hidden'"); ?>>
<thead><tr><th><?php echo lang('Partition name'); ?><th><?php echo lang('Values'); ?></thead>
<?php
foreach ($row["partition_names"] as $key => $val) {

View File

@@ -66,7 +66,7 @@ if ($adminer->homepage()) {
}
}
echo "<div class='scrollable'>\n";
echo "<table cellspacing='0' class='nowrap checkable odds'>\n";
echo "<table class='nowrap checkable odds'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo '<thead><tr class="wrap">';
echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^(tables|views)\[/);", "");
@@ -161,7 +161,7 @@ if ($adminer->homepage()) {
echo "<h3 id='routines'>" . lang('Routines') . "</h3>\n";
$routines = routines();
if ($routines) {
echo "<table cellspacing='0' class='odds'>\n";
echo "<table class='odds'>\n";
echo '<thead><tr><th>' . lang('Name') . '<td>' . lang('Type') . '<td>' . lang('Return type') . "<td></thead>\n";
foreach ($routines as $row) {
$name = ($row["SPECIFIC_NAME"] == $row["ROUTINE_NAME"] ? "" : "&name=" . urlencode($row["ROUTINE_NAME"])); // not computed on the pages to be able to print the header first
@@ -183,7 +183,7 @@ if ($adminer->homepage()) {
echo "<h3 id='sequences'>" . lang('Sequences') . "</h3>\n";
$sequences = get_vals("SELECT sequence_name FROM information_schema.sequences WHERE sequence_schema = current_schema() ORDER BY sequence_name");
if ($sequences) {
echo "<table cellspacing='0' class='odds'>\n";
echo "<table class='odds'>\n";
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
foreach ($sequences as $val) {
echo "<tr><th><a href='" . h(ME) . "sequence=" . urlencode($val) . "'>" . h($val) . "</a>\n";
@@ -197,7 +197,7 @@ if ($adminer->homepage()) {
echo "<h3 id='user-types'>" . lang('User types') . "</h3>\n";
$user_types = types();
if ($user_types) {
echo "<table cellspacing='0' class='odds'>\n";
echo "<table class='odds'>\n";
echo "<thead><tr><th>" . lang('Name') . "</thead>\n";
foreach ($user_types as $val) {
echo "<tr><th><a href='" . h(ME) . "type=" . urlencode($val) . "'>" . h($val) . "</a>\n";
@@ -211,7 +211,7 @@ if ($adminer->homepage()) {
echo "<h3 id='events'>" . lang('Events') . "</h3>\n";
$rows = get_rows("SHOW EVENTS");
if ($rows) {
echo "<table cellspacing='0'>\n";
echo "<table>\n";
echo "<thead><tr><th>" . lang('Name') . "<td>" . lang('Schedule') . "<td>" . lang('Start') . "<td>" . lang('End') . "<td></thead>\n";
foreach ($rows as $row) {
echo "<tr>";

View File

@@ -137,7 +137,7 @@ page_header(lang('Export'), $error, ($_GET["export"] != "" ? array("table" => $_
?>
<form action="" method="post">
<table cellspacing="0" class="layout">
<table class="layout">
<?php
$db_style = array('', 'USE', 'DROP+CREATE', 'CREATE');
$table_style = array('', 'DROP+CREATE', 'CREATE');
@@ -174,7 +174,7 @@ echo "<tr><th>" . lang('Data') . "<td>" . html_select('data_style', $data_style,
<p><input type="submit" value="<?php echo lang('Export'); ?>">
<input type="hidden" name="token" value="<?php echo $token; ?>">
<table cellspacing="0">
<table>
<?php
echo script("qsl('table').onclick = dumpClick;");
$prefixes = array();

View File

@@ -35,7 +35,7 @@ if (!$row && $EVENT != "") {
?>
<form action="" method="post">
<table cellspacing="0" class="layout">
<table class="layout">
<tr><th><?php echo lang('Name'); ?><td><input name="EVENT_NAME" value="<?php echo h($row["EVENT_NAME"]); ?>" data-maxlength="64" autocapitalize="off">
<tr><th title="datetime"><?php echo lang('Start'); ?><td><input name="STARTS" value="<?php echo h("$row[EXECUTE_AT]$row[STARTS]"); ?>">
<tr><th title="datetime"><?php echo lang('End'); ?><td><input name="ENDS" value="<?php echo h($row["ENDS"]); ?>">

View File

@@ -77,7 +77,7 @@ if ($jush == "pgsql") {
?>
<input type="hidden" name="change-js" value="">
<noscript><p><input type="submit" name="change" value="<?php echo lang('Change'); ?>"></noscript>
<table cellspacing="0">
<table>
<thead><tr><th id="label-source"><?php echo lang('Source'); ?><th id="label-target"><?php echo lang('Target'); ?></thead>
<?php
$j = 0;

View File

@@ -118,7 +118,7 @@ class Adminer {
*/
function loginForm() {
global $drivers;
echo "<table cellspacing='0' class='layout'>\n";
echo "<table class='layout'>\n";
echo $this->loginFormField('driver', '<tr><th>' . lang('System') . '<td>', html_select("auth[driver]", $drivers, DRIVER, "loginDriver(this);") . "\n");
echo $this->loginFormField('server', '<tr><th>' . lang('Server') . '<td>', '<input name="auth[server]" value="' . h(SERVER) . '" title="hostname[:port]" placeholder="localhost" autocapitalize="off">' . "\n");
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input name="auth[username]" id="username" autofocus value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">' . script("qs('#username').form['auth[driver]'].onchange();"));
@@ -311,7 +311,7 @@ class Adminer {
function tableStructurePrint($fields) {
global $structured_types;
echo "<div class='scrollable'>\n";
echo "<table cellspacing='0' class='nowrap odds'>\n";
echo "<table class='nowrap odds'>\n";
echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
echo "<tr><th>" . h($field["field"]);
@@ -335,7 +335,7 @@ class Adminer {
* @return null
*/
function tableIndexesPrint($indexes) {
echo "<table cellspacing='0'>\n";
echo "<table>\n";
foreach ($indexes as $name => $index) {
ksort($index["columns"]); // enforce correct columns order
$print = array();

View File

@@ -29,7 +29,7 @@ function connect_error() {
$scheme = support("scheme");
$collations = collations();
echo "<form action='' method='post'>\n";
echo "<table cellspacing='0' class='checkable odds'>\n";
echo "<table class='checkable odds'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo "<thead><tr>"
. (support("database") ? "<td>" : "")

View File

@@ -19,7 +19,7 @@ function select($result, $connection2 = null, $orgtables = array(), $limit = 0)
for ($i=0; (!$limit || $i < $limit) && ($row = $result->fetch_row()); $i++) {
if (!$i) {
echo "<div class='scrollable'>\n";
echo "<table cellspacing='0' class='nowrap odds'>\n";
echo "<table class='nowrap odds'>\n";
echo "<thead><tr>";
for ($j=0; $j < count($row); $j++) {
$field = $result->fetch_field();

View File

@@ -1213,7 +1213,7 @@ function select_value($val, $link, $field, $text_length) {
. "<td>" . select_value($v, $link, $field, $text_length)
;
}
return "<table cellspacing='0'>$return</table>";
return "<table>$return</table>";
}
if (!$link) {
$link = $adminer->selectLink($val, $field);
@@ -1406,7 +1406,7 @@ function edit_form($table, $fields, $row, $update) {
if (!$fields) {
echo "<p class='error'>" . lang('You have no privileges to update this table.') . "\n";
} else {
echo "<table cellspacing='0' class='layout'>" . script("qsl('table').onkeydown = editingKeydown;");
echo "<table class='layout'>" . script("qsl('table').onkeydown = editingKeydown;");
foreach ($fields as $name => $field) {
echo "<tr><th>" . $adminer->fieldName($field);
$default = $_GET["set"][bracket_escape($name)];

View File

@@ -99,7 +99,7 @@ $show_options = ($_POST ? $_POST["options"] : adminer_setting("index_options"));
<form action="" method="post">
<div class="scrollable">
<table cellspacing="0" class="nowrap">
<table class="nowrap">
<thead><tr>
<th id="label-type"><?php echo lang('Index Type'); ?>
<th><input type="submit" class="wayoff"><?php

View File

@@ -14,7 +14,7 @@ echo "<form action=''><p>\n";
hidden_fields_get();
echo "<input type='hidden' name='db' value='" . h(DB) . "'>\n";
echo ($grant ? "" : "<input type='hidden' name='grant' value=''>\n");
echo "<table cellspacing='0' class='odds'>\n";
echo "<table class='odds'>\n";
echo "<thead><tr><th>" . lang('Username') . "<th>" . lang('Server') . "<th></thead>\n";
while ($row = $result->fetch_assoc()) {

View File

@@ -39,7 +39,7 @@ $routine_languages = routine_languages();
<?php echo ($routine_languages ? lang('Language') . ": " . html_select("language", $routine_languages, $row["language"]) . "\n" : ""); ?>
<input type="submit" value="<?php echo lang('Save'); ?>">
<div class="scrollable">
<table cellspacing="0" class="nowrap">
<table class="nowrap">
<?php
edit_fields($row["fields"], $collations, $routine);
if (isset($_GET["function"])) {

View File

@@ -16,7 +16,7 @@ page_header(lang('Process list'), $error);
<form action="" method="post">
<div class="scrollable">
<table cellspacing="0" class="nowrap checkable odds">
<table class="nowrap checkable odds">
<?php
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
// HTML valid because there is always at least one process

View File

@@ -312,7 +312,7 @@ if (!$columns && support("table")) {
$backward_keys = $adminer->backwardKeys($TABLE, $table_name);
echo "<div class='scrollable'>";
echo "<table id='table' cellspacing='0' class='nowrap checkable odds'>";
echo "<table id='table' class='nowrap checkable odds'>";
echo script("mixin(qs('#table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true), onkeydown: editingKeydown});");
echo "<thead><tr>" . (!$group && $select
? ""

View File

@@ -38,7 +38,7 @@ if (!is_view($table_status)) {
echo "<h3 id='foreign-keys'>" . lang('Foreign keys') . "</h3>\n";
$foreign_keys = foreign_keys($TABLE);
if ($foreign_keys) {
echo "<table cellspacing='0'>\n";
echo "<table>\n";
echo "<thead><tr><th>" . lang('Source') . "<td>" . lang('Target') . "<td>" . lang('ON DELETE') . "<td>" . lang('ON UPDATE') . "<td></thead>\n";
foreach ($foreign_keys as $name => $foreign_key) {
echo "<tr title='" . h($name) . "'>";
@@ -62,7 +62,7 @@ if (!is_view($table_status)) {
echo "<h3 id='checks'>" . lang('Checks') . "</h3>\n";
$check_constraints = check_constraints($TABLE);
if ($check_constraints) {
echo "<table cellspacing='0'>\n";
echo "<table>\n";
foreach ($check_constraints as $key => $val) {
echo "<tr title='" . h($key) . "'>";
echo "<td><code class='jush-$jush'>" . h($val);
@@ -79,7 +79,7 @@ if (support(is_view($table_status) ? "view_trigger" : "trigger")) {
echo "<h3 id='triggers'>" . lang('Triggers') . "</h3>\n";
$triggers = triggers($TABLE);
if ($triggers) {
echo "<table cellspacing='0'>\n";
echo "<table>\n";
foreach ($triggers as $key => $val) {
echo "<tr valign='top'><td>" . h($val[0]) . "<td>" . h($val[1]) . "<th>" . h($key) . "<td><a href='" . h(ME . 'trigger=' . urlencode($TABLE) . '&name=' . urlencode($key)) . "'>" . lang('Alter') . "</a>\n";
}

View File

@@ -33,7 +33,7 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat
?>
<form action="" method="post" id="form">
<table cellspacing="0" class="layout">
<table class="layout">
<tr><th><?php echo lang('Time'); ?><td><?php echo html_select("Timing", $trigger_options["Timing"], $row["Timing"], "triggerChange(/^" . preg_quote($TABLE, "/") . "_[ba][iud]$/, '" . js_escape($TABLE) . "', this.form);"); ?>
<tr><th><?php echo lang('Event'); ?><td><?php echo html_select("Event", $trigger_options["Event"], $row["Event"], "this.form['Timing'].onchange();"); ?>
<?php echo (in_array("UPDATE OF", $trigger_options["Event"]) ? " <input name='Of' value='" . h($row["Of"]) . "' class='hidden'>": ""); ?>

View File

@@ -131,7 +131,7 @@ if ($_POST) {
?>
<form action="" method="post">
<table cellspacing="0" class="layout">
<table class="layout">
<tr><th><?php echo lang('Server'); ?><td><input name="host" data-maxlength="60" value="<?php echo h($row["host"]); ?>" autocapitalize="off">
<tr><th><?php echo lang('Username'); ?><td><input name="user" data-maxlength="80" value="<?php echo h($row["user"]); ?>" autocapitalize="off">
<tr><th><?php echo lang('Password'); ?><td><input name="pass" id="pass" value="<?php echo h($row["pass"]); ?>" autocomplete="new-password">
@@ -141,7 +141,7 @@ if ($_POST) {
<?php
//! MAX_* limits, REQUIRE
echo "<table cellspacing='0' class='odds'>\n";
echo "<table class='odds'>\n";
echo "<thead><tr><th colspan='2'>" . lang('Privileges') . doc_link(array('sql' => "grant.html#priv_level"));
$i = 0;
foreach ($grants as $object => $grant) {

View File

@@ -6,7 +6,7 @@ $variables = ($status ? show_status() : show_variables());
if (!$variables) {
echo "<p class='message'>" . lang('No rows.') . "\n";
} else {
echo "<table cellspacing='0'>\n";
echo "<table>\n";
foreach ($variables as $key => $val) {
echo "<tr>";
echo "<th><code class='jush-" . $jush . ($status ? "status" : "set") . "'>" . h($key) . "</code>";

View File

@@ -8,7 +8,7 @@ if ($adminer->homepage()) {
search_tables();
}
echo "<div class='scrollable'>\n";
echo "<table cellspacing='0' class='nowrap checkable odds'>\n";
echo "<table class='nowrap checkable odds'>\n";
echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
echo '<thead><tr class="wrap">';
echo '<td><input id="check-all" type="checkbox" class="jsonly">' . script("qs('#check-all').onclick = partial(formCheck, /^tables\[/);", "");

View File

@@ -71,7 +71,7 @@ class Adminer {
}
function loginForm() {
echo "<table cellspacing='0' class='layout'>\n";
echo "<table class='layout'>\n";
echo $this->loginFormField('username', '<tr><th>' . lang('Username') . '<td>', '<input type="hidden" name="auth[driver]" value="server"><input name="auth[username]" autofocus value="' . h($_GET["username"]) . '" autocomplete="username" autocapitalize="off">');
echo $this->loginFormField('password', '<tr><th>' . lang('Password') . '<td>', '<input type="password" name="auth[password]" autocomplete="current-password">' . "\n");
echo "</table>\n";

View File

@@ -16,7 +16,7 @@ class AdminerJsonColumn {
}
private function _buildTable($json) {
echo '<table cellspacing="0" style="margin:2px; font-size:100%;">';
echo '<table style="margin:2px; font-size:100%;">';
foreach ($json as $key => $val) {
echo '<tr>';
echo '<th>' . h($key) . '</th>';

View File

@@ -13,7 +13,7 @@ class AdminerTableIndexesStructure {
* @return bool
*/
function tableIndexesPrint($indexes) {
echo "<table cellspacing='0'>\n";
echo "<table>\n";
echo "<thead><tr><th>" . lang('Name') . "<th>" . lang('Type') . "<th>" . lang('Columns') . "</thead>\n";
foreach ($indexes as $name => $index) {
echo "<tr><th>" . h($name) . "<td>" . $index['type'];

View File

@@ -14,7 +14,7 @@ class AdminerTableStructure {
*/
function tableStructurePrint($fields) {
echo "<div class='scrollable'>\n";
echo "<table cellspacing='0' class='nowrap odds'>\n";
echo "<table class='nowrap odds'>\n";
echo "<thead><tr><th>" . lang('Column') . "<th>" . lang('Type') . "<th>" . lang('Nullable') . "<th>" . lang('Default') . (support("comment") ? "<th>" . lang('Comment') : "") . "</thead>\n";
foreach ($fields as $field) {
echo "<tr><th>" . h($field["field"]) . ($field["primary"] ? " (PRIMARY)" : "");

View File

@@ -13,7 +13,7 @@ Skinnable plus.gif and other images - http://typo3.org/extensions/repository/vie
? Aliasing of built-in functions can save 7 KB, function minification can save 7 KB, substitution of repetitive $a["a"] can save 4 KB, substitution of $_GET and friends can save 2 KB, aliasing of $connection->query can save 24 B, JS Closure compiler can save 2 KB, not enclosing HTML attribute values can save 1.2 KB, replacing \\n by \n can save .3 KB
? Branch binary_compile: LZW compression of all texts can save 11 KB, using chars 127-255 in minification can save 1 KB
https://github.com/vrana/adminer/compare/master...adminerneo:adminerneo:main
https://github.com/vrana/adminer/compare/master...adminneo-org:adminneo:main
MySQL: Do not show 'empty' enum value in strict mode
MySQL: Print comments of stored procedures and functions
Add drag-n-drop moving of rows in table editing