Link to bookmark SQL command

This commit is contained in:
Jakub Vrana 2010-10-24 00:45:12 +02:00
parent b69f9b4a60
commit b7b40b5bd9
2 changed files with 2 additions and 1 deletions

View file

@ -92,7 +92,7 @@ if (!$error && $_POST) {
do {
$result = $connection->store_result();
$end = explode(" ", microtime());
$time = " <span class='time'>(" . lang('%.3f s', max(0, $end[0] - $start[0] + $end[1] - $start[1])) . ")</span>";
$time = " <span class='time'>(" . lang('%.3f s', max(0, $end[0] - $start[0] + $end[1] - $start[1])) . ")</span>" . (strlen($q) < 1000 ? " <a href='" . h(ME) . "sql=" . urlencode(trim($q)) . "'>" . lang('Edit') . "</a>" : ""); // 1000 - maximum length of encoded URL in IE is 2083 characters
if (!is_object($result)) {
if (preg_match("~^$space*(CREATE|DROP|ALTER)$space+(DATABASE|SCHEMA)\\b~isU", $q)) {
restart_session();

View file

@ -3,6 +3,7 @@ Option to show only errors in SQL command
Highlight and edit SQL command in processlist
Disable XSS "protection" of IE8
Timestamp in export
Link to bookmark SQL command
Immunity against zend.ze1_compatibility_mode
Fix last page with empty result set