]> git.joonet.de Git - adminer.git/commitdiff
Display comment in title of field
authorJakub Vrana <jakub@vrana.cz>
Sun, 16 Mar 2025 21:49:50 +0000 (22:49 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sun, 16 Mar 2025 21:49:50 +0000 (22:49 +0100)
adminer/include/adminer.inc.php
changes.txt
plugins/struct-comments.php [deleted file]

index aab19455f039cd757657233e748df20c133863de..901e3a1286a016a72ec4b712efe805c44d75166c 100644 (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
index 9f4b804ea4c9e64ea6bf908f1a74400e43c9c2e8..1d6b98de0c24e596e3711ab0ec2a74797e7ebdcd 100644 (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)
diff --git a/plugins/struct-comments.php b/plugins/struct-comments.php
deleted file mode 100644 (file)
index 80c216d..0000000
+++ /dev/null
@@ -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>';
-       }
-}