mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 17:44:07 +02:00
Highlighting only inside <code>
This commit is contained in:
@@ -398,7 +398,7 @@ document.getElementById('username').focus();
|
||||
? ereg_replace('[\x80-\xFF]+$', '', substr($query, 0, 1e6)) . "\n..." // [\x80-\xFF] - valid UTF-8, \n - can end by one-line comment
|
||||
: $query
|
||||
); //! respect $_GET["ns"]
|
||||
return " <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('SQL command') . "</a><div id='$id' class='hidden'><pre class='jush-$jush'>" . shorten_utf8($query, 1000) . '</pre><p><a href="' . h(str_replace("db=" . urlencode(DB), "db=" . urlencode($_GET["db"]), ME) . 'sql=&history=' . (count($history[$_GET["db"]]) - 1)) . '">' . lang('Edit') . '</a></div>';
|
||||
return " <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('SQL command') . "</a><div id='$id' class='hidden'><pre><code class='jush-$jush'>" . shorten_utf8($query, 1000) . '</code></pre><p><a href="' . h(str_replace("db=" . urlencode(DB), "db=" . urlencode($_GET["db"]), ME) . 'sql=&history=' . (count($history[$_GET["db"]]) - 1)) . '">' . lang('Edit') . '</a></div>';
|
||||
}
|
||||
|
||||
/** Functions displayed in edit form
|
||||
|
@@ -59,7 +59,7 @@ if (!$error && $_POST) {
|
||||
$empty = false;
|
||||
$q = substr($query, 0, $match[0][1]);
|
||||
$commands++;
|
||||
echo "<pre class='jush-$jush' id='sql-$commands'>" . shorten_utf8(trim($q), 1000) . "</pre>\n";
|
||||
echo "<pre id='sql-$commands'><code class='jush-$jush'>" . shorten_utf8(trim($q), 1000) . "</code></pre>\n";
|
||||
ob_flush();
|
||||
flush(); // can take a long time - show the running query
|
||||
$start = explode(" ", microtime()); // microtime(true) is available since PHP 5
|
||||
|
@@ -22,8 +22,7 @@ function bodyLoad(version, protocol) {
|
||||
if (window.jushLinks) {
|
||||
jush.custom_links = jushLinks;
|
||||
}
|
||||
jush.highlight_tag('pre', 0);
|
||||
jush.highlight_tag('code');
|
||||
jush.highlight_tag('code', 0);
|
||||
}
|
||||
};
|
||||
script.onreadystatechange = function () {
|
||||
|
@@ -223,8 +223,7 @@ function ajaxSend(url, data) {
|
||||
clearTimeout(ajaxTimeout);
|
||||
setHtml('main', text);
|
||||
if (window.jush) {
|
||||
jush.highlight_tag('code');
|
||||
jush.highlight_tag('pre', 0);
|
||||
jush.highlight_tag('code', 0);
|
||||
}
|
||||
}
|
||||
}, data);
|
||||
|
Reference in New Issue
Block a user