From c38dedb7f6e029e84c959e6b838c5b8ca67aea14 Mon Sep 17 00:00:00 2001 From: Lionel Laffineur Date: Sun, 28 May 2023 21:33:24 +0200 Subject: [PATCH 1/3] Implemented copy-to-clipboard at 2 places --- adminer/include/adminer.inc.php | 7 ++++--- adminer/include/design.inc.php | 1 + adminer/static/functions.js | 24 +++++++++++++++++++++++- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/adminer/include/adminer.inc.php b/adminer/include/adminer.inc.php index 401e4f27..92c4c88a 100644 --- a/adminer/include/adminer.inc.php +++ b/adminer/include/adminer.inc.php @@ -238,8 +238,9 @@ class Adminer { . "$return\n" ; } - return "

" . h(str_replace("\n", " ", $query)) . " (" . format_time($start) . ")" + return "

\n"; } return " " . @date("H:i:s") . "" // @ - time zone may be not set - . " $return Date: Mon, 29 May 2023 14:59:12 +0200 Subject: [PATCH 2/3] Added one more copy to clipboard --- adminer/sql.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index 5c263388..3685b320 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -97,7 +97,8 @@ if (!$error && $_POST) { $empty = false; $q = substr($query, 0, $pos); $commands++; - $print = "
" . $adminer->sqlCommandQuery($q) . "
\n"; + $print = "
" . $adminer->sqlCommandQuery($q) . "
\n"; + $print .= "" . lang('Copy to clipboard') . ""; if ($jush == "sqlite" && preg_match("~^$space*+ATTACH\\b~i", $q, $match)) { // PHP doesn't support setting SQLITE_LIMIT_ATTACHED echo $print; From 90d58ed55034bacde468aa7657941997dba200a7 Mon Sep 17 00:00:00 2001 From: Lionel Laffineur Date: Sat, 1 Jul 2023 20:13:20 +0200 Subject: [PATCH 3/3] Added body and html closing tags --- adminer/include/design.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/adminer/include/design.inc.php b/adminer/include/design.inc.php index 200e9120..60d3b5e8 100644 --- a/adminer/include/design.inc.php +++ b/adminer/include/design.inc.php @@ -193,4 +193,5 @@ function page_footer($missing = "") { \n"; }