]> git.joonet.de Git - adminer.git/commitdiff
PostgreSQL: Link user defined types
authorJakub Vrana <jakub@vrana.cz>
Sat, 22 Feb 2025 11:36:58 +0000 (12:36 +0100)
committerJakub Vrana <jakub@vrana.cz>
Sat, 22 Feb 2025 11:36:58 +0000 (12:36 +0100)
adminer/include/adminer.inc.php
changes.txt

index 7ead1a69c62c5900879da0df4cf069283e9cb2ba..0297d97eae8093b72425ab5bed056e4239802c81 100644 (file)
@@ -309,12 +309,17 @@ class Adminer {
        * @return null
        */
        function tableStructurePrint($fields) {
+               global $structured_types;
                echo "<div class='scrollable'>\n";
                echo "<table cellspacing='0' 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"]);
-                       echo "<td><span title='" . h($field["collation"]) . "'>" . h($field["full_type"]) . "</span>";
+                       $type = h($field["full_type"]);
+                       echo "<td><span title='" . h($field["collation"]) . "'>"
+                               . (in_array($type, (array) $structured_types[lang('User types')]) ? "<a href='" . h(ME . 'type=' . urlencode($type)) . "'>$type</a>" : $type)
+                               . "</span>"
+                       ;
                        echo ($field["null"] ? " <i>NULL</i>" : "");
                        echo ($field["auto_increment"] ? " <i>" . lang('Auto Increment') . "</i>" : "");
                        echo (isset($field["default"]) ? " <span title='" . lang('Default value') . "'>[<b>" . h($field["default"]) . "</b>]</span>" : "");
index 6f35a106626a7a99fa83348bca17eb025b7ebf70..fefb337336daf739592c8d541081e7b9961ba28b 100644 (file)
@@ -1,5 +1,6 @@
 Adminer 4.16.1-dev:
 Hide index column options by default
+PostgreSQL: Link user defined types
 SQLite: Show all supported pragmas in Variables
 MS SQL: Allow altering table in non-default schema (bug #405)
 MS SQL: Fix default values (bug #732, bug #733)