]> git.joonet.de Git - adminer.git/commitdiff
Link to bookmark SQL command
authorJakub Vrana <jakub@vrana.cz>
Sat, 23 Oct 2010 22:45:12 +0000 (00:45 +0200)
committerJakub Vrana <jakub@vrana.cz>
Sat, 23 Oct 2010 22:45:12 +0000 (00:45 +0200)
adminer/sql.inc.php
changes.txt

index 24c078728c7c6aca4f1b11179cc1502f1c711c3f..5e1a0cd02afcc82e324e8684880fb94ca3e43390 100644 (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();
index bbd8541ffd50c5100392dcb788b9188ee3e2c3f9..4cb4f24e3f522c098735569457a64e85686e4ef0 100644 (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