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

Display comment in title of field

This commit is contained in:
Jakub Vrana
2025-03-16 22:49:50 +01:00
parent 0b0e8940e0
commit dd47df9b9c
3 changed files with 2 additions and 15 deletions

View File

@@ -172,7 +172,7 @@ class Adminer {
* @return string HTML code, "" to ignore field
*/
function fieldName($field, $order = 0) {
return '<span title="' . h($field["full_type"]) . '">' . h($field["field"]) . '</span>';
return '<span title="' . h($field["full_type"] . ($field["comment"] != "" ? " : $field[comment]" : '')) . '">' . h($field["field"]) . '</span>';
}
/** Print links after select heading

View File

@@ -1,5 +1,6 @@
Adminer dev:
Align numbers right (bug #912)
Display comment in title of field
Remember export setting at SQL command
SQL textarea: Open help on Ctrl+click
Security: Disallow writing temporary files to symlinks (bug #855)

View File

@@ -1,14 +0,0 @@
<?php
/** Show comments of sql structure in more places (mainly where you edit things)
* @link https://www.adminer.org/plugins/#use
* @author Adam Kuśmierz, http://kusmierz.be/
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License, Version 2.0
* @license https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 (one or other)
*/
class AdminerStructComments {
function fieldName(&$field, $order = 0) {
return '<span title="' . Adminer\h($field["full_type"]) . (!empty($field["comment"]) ? ': ' . $field["comment"] : '') . '">' . Adminer\h($field["field"]) . '</span>';
}
}