]> git.joonet.de Git - adminer.git/commitdiff
Move whitespace to CSS
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 13 Oct 2009 19:43:33 +0000 (19:43 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 13 Oct 2009 19:43:33 +0000 (19:43 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1189 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/include/editing.inc.php
adminer/include/functions.inc.php
adminer/select.inc.php
adminer/static/default.css

index 8aa7f06854f54233d0641105c814a2bd1edc199c..e631b421f311e976ae44a5660d87167ff099bc4c 100644 (file)
@@ -56,7 +56,7 @@ function select($result, $connection2 = null) {
                                        } elseif (!strlen($val)) {
                                                $val = "&nbsp;"; // some content to print a border
                                        } else {
-                                               $val = whitespace(h($val));
+                                               $val = h($val);
                                                if ($types[$key] == 254) {
                                                        $val = "<code>$val</code>";
                                                }
@@ -188,7 +188,7 @@ if ($type == "PROCEDURE") {
                echo "&nbsp;<input type='image' name='drop_col[$i]' src='../adminer/static/cross.gif' alt='x' title='" . lang('Remove') . "' onclick='return !editing_remove_row(this);'>";
                echo "&nbsp;<input type='image' name='up[$i]' src='../adminer/static/up.gif' alt='^' title='" . lang('Move up') . "'>";
                echo "&nbsp;<input type='image' name='down[$i]' src='../adminer/static/down.gif' alt='v' title='" . lang('Move down') . "'>";
-               echo "\n\n";
+               echo "\n";
        }
        return $column_comments;
 }
index 304bc1acaff3a9651e6252cfe8c64a82ae9c4428..2140e818be92e972ce421958d3085bc4aec21605 100644 (file)
@@ -43,14 +43,6 @@ function h($string) {
        return htmlspecialchars($string, ENT_QUOTES);
 }
 
-/** Convert text whitespace to HTML
-* @param string
-* @return string
-*/
-function whitespace($string) {
-       return nl2br(preg_replace('~(^| ) ~m', '\\1&nbsp;', str_replace("\t", "    ", $string)));
-}
-
 /** Escape for TD
 * @param string
 * @return string
index de6d46340d178d61496721c8ed626d54405ff3e9..1bd75b528f641b47a0b2271555fa4b2377c64a81 100644 (file)
@@ -212,9 +212,9 @@ if (!$columns) {
                                                        if (!strlen($val)) {
                                                                $val = "&nbsp;";
                                                        } elseif (strlen($text_length) && ereg('text|blob', $field["type"]) && is_utf8($val)) {
-                                                               $val = whitespace(shorten_utf8($val, max(0, intval($text_length)))); // usage of LEFT() would reduce traffic but complicate query
+                                                               $val = shorten_utf8($val, max(0, intval($text_length))); // usage of LEFT() would reduce traffic but complicate query
                                                        } else {
-                                                               $val = whitespace(h($val));
+                                                               $val = h($val);
                                                        }
                                                        
                                                        if (!$link) { // link related items
index 2c1b3e3a8f5c38c59b91f51ce517a5b30f6e8f80..097ae98fa1fe8adcded1c910569a5824ba88b32c 100644 (file)
@@ -18,7 +18,7 @@ code { background: #eee; }
 tr:hover td, tr:hover th { background: #ddf; }
 .version { color: #777; font-size: 67%; }
 .js .hidden { display: none; }
-.nowrap { white-space: nowrap; }
+.nowrap { white-space: pre; }
 .wrap { white-space: normal; }
 .error { color: red; background: #fee; }
 .message { color: green; background: #efe; }