]> git.joonet.de Git - adminer.git/commitdiff
Remove line comments from history display
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 28 Jul 2009 12:27:19 +0000 (12:27 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Tue, 28 Jul 2009 12:27:19 +0000 (12:27 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@925 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/sql.inc.php

index 88397f40d41ccea00a894f11b4fd8bb8c27dade9..9fbcb8587ada64401693474c2a97b648a95964af 100644 (file)
@@ -96,7 +96,7 @@ if ($history) {
        echo "<fieldset><legend>" . lang('History') . "</legend>\n";
        foreach ($history as $key => $val) {
                //! save and display timestamp
-               echo '<a href="' . htmlspecialchars($SELF . "sql=&history=$key") . '">' . lang('Edit') . '</a> <code class="jush-sql">' . shorten_utf8(str_replace("\n", " ", $val), 80, "</code>") . "<br>\n";
+               echo '<a href="' . htmlspecialchars($SELF . "sql=&history=$key") . '">' . lang('Edit') . '</a> <code class="jush-sql">' . shorten_utf8(ltrim(str_replace("\n", " ", preg_replace('~^(#|-- ).*~m', '', $val))), 80, "</code>") . "<br>\n";
        }
        echo "<input type='submit' name='clear' value='" . lang('Clear') . "'>\n";
        echo "</fieldset>\n";