]> git.joonet.de Git - adminer.git/commitdiff
Display newlines in column comments (bug #573)
authorJakub Vrana <jakub@vrana.cz>
Mon, 22 Jan 2018 20:03:48 +0000 (21:03 +0100)
committerJakub Vrana <jakub@vrana.cz>
Mon, 22 Jan 2018 20:05:56 +0000 (21:05 +0100)
adminer/include/adminer.inc.php
adminer/static/default.css
adminer/table.inc.php
changes.txt
plugins/table-structure.php

index 98c3dd61ab43524a272da61c7b9a5eb35faf14e3..720be4cc12046959bb78c24a7acb907fa01fa750 100644 (file)
@@ -267,7 +267,7 @@ class Adminer {
        * @return null
        */
        function tableStructurePrint($fields) {
-               echo "<table cellspacing='0'>\n";
+               echo "<table cellspacing='0' class='nowrap'>\n";
                echo "<thead><tr><th>" . lang('Column') . "<td>" . lang('Type') . (support("comment") ? "<td>" . lang('Comment') : "") . "</thead>\n";
                foreach ($fields as $field) {
                        echo "<tr" . odd() . "><th>" . h($field["field"]);
index 13e111e781c3877c6a5b838cc8a4a3d9f3db77b8..7e46dcd58375094be5fad7e6b133548ed2744006 100644 (file)
@@ -32,7 +32,7 @@ input.wayoff { left: -1000px; position: absolute; }
 .version { color: #777; font-size: 67%; }
 .js .hidden, .nojs .jsonly { display: none; }
 .js .column { position: absolute; background: #ddf; padding: .27em 1ex .3em 0; margin-top: -.27em; }
-.nowrap td, .nowrap th, td.nowrap { white-space: pre; }
+.nowrap td, .nowrap th, td.nowrap, p.nowrap { white-space: pre; }
 .wrap td { white-space: normal; }
 .error { color: red; background: #fee; }
 .error b { background: #fff; font-weight: normal; }
index 289eca5513a7f3e89f804f5b75b043be440450dc..b980fe5d5d9163dd9c1e5d909c8994592ddfaccd 100644 (file)
@@ -11,7 +11,7 @@ page_header(($fields && is_view($table_status) ? $table_status['Engine'] == 'mat
 $adminer->selectLinks($table_status);
 $comment = $table_status["Comment"];
 if ($comment != "") {
-       echo "<p>" . lang('Comment') . ": " . h($comment) . "\n";
+       echo "<p class='nowrap'>" . lang('Comment') . ": " . h($comment) . "\n";
 }
 
 if ($fields) {
index 15fdbb2c94fb08c2660b4f5724a59a1975d449f9..05b65f1c91ebad01c0009e4a770f171383030e3e 100644 (file)
@@ -1,4 +1,5 @@
 Adminer 4.4.1-dev:
+Display newlines in column comments (bug #573)
 Adminer: Fix Search data in tables (regression from 4.4.0)
 CSP: Allow any styles, images, media and fonts, disallow base-uri
 MySQL: Support geometry in MySQL 8 (bug #574)
index 0f51e15210c55b40c01785ad33ad62ab051c533c..09d7a6e51e1c72f6a2e0da3e02279887b799001a 100644 (file)
@@ -13,7 +13,7 @@ class AdminerTableStructure {
        * @return bool
        */
        function tableStructurePrint($fields) {
-               echo "<table cellspacing='0'>\n";
+               echo "<table cellspacing='0' class='nowrap'>\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" . odd() . "><th>" . h($field["field"]) . ($field["primary"] ? " (PRIMARY)" : "");