Permalink
Browse files

Remove line comments from history display

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@925 7c3ca157-0c34-0410-bff1-cbf682f78f5c
  • Loading branch information...
jakubvrana
jakubvrana committed Jul 28, 2009
1 parent 1a6a73a commit 0d0cb8852cfe9d06c1d2aca32050137f7244f47e
Showing with 1 addition and 1 deletion.
  1. +1 −1 adminer/sql.inc.php
View
@@ -96,7 +96,7 @@
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";

0 comments on commit 0d0cb88

Please sign in to comment.