From a5ee3451ac5695625b7294b84f2c119be1131c65 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 12 Jan 2018 14:43:55 +0100 Subject: [PATCH] Use \n" // used by trCheck() - . "\n" + . "" . confirm() . "\n" . "\n" : "" ); diff --git a/adminer/include/functions.inc.php b/adminer/include/functions.inc.php index 3bd4d0fa..abe934a0 100644 --- a/adminer/include/functions.inc.php +++ b/adminer/include/functions.inc.php @@ -189,10 +189,11 @@ function select_input($attrs, $options, $value = "", $onchange = "", $placeholde } /** Get onclick confirmation +* @param string * @return string */ -function confirm() { - return " onclick=\"return confirm('" . lang('Are you sure?') . "');\""; +function confirm($selector = "qsl('input')") { + return ""; } /** Print header for hidden fieldset (close by ) @@ -1385,7 +1386,7 @@ function edit_form($TABLE, $fields, $row, $update) { ) . "' title='Ctrl+Shift+Enter'>\n"; } } - echo ($update ? "\n" + echo ($update ? "" . confirm() . "\n" : ($_POST || !$fields ? "" : "\n") ); if (isset($_GET["select"])) { diff --git a/adminer/procedure.inc.php b/adminer/procedure.inc.php index 83a1668a..466e0b8d 100644 --- a/adminer/procedure.inc.php +++ b/adminer/procedure.inc.php @@ -49,6 +49,6 @@ if (isset($_GET["function"])) {

-> + diff --git a/adminer/scheme.inc.php b/adminer/scheme.inc.php index fc588dd6..bc79e1b9 100644 --- a/adminer/scheme.inc.php +++ b/adminer/scheme.inc.php @@ -31,7 +31,7 @@ if (!$row) { \n"; + echo "" . confirm() . "\n"; } ?> diff --git a/adminer/select.inc.php b/adminer/select.inc.php index ef9d3e48..12767bdc 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -503,7 +503,7 @@ if (!$columns && support("table")) {

-> +
"> \n"; + echo "" . confirm() . "\n"; } ?> diff --git a/adminer/trigger.inc.php b/adminer/trigger.inc.php index 94b98ba9..498b54e5 100644 --- a/adminer/trigger.inc.php +++ b/adminer/trigger.inc.php @@ -44,6 +44,6 @@ page_header(($name != "" ? lang('Alter trigger') . ": " . h($name) : lang('Creat

-> + diff --git a/adminer/type.inc.php b/adminer/type.inc.php index 01712b26..4ba78bc3 100644 --- a/adminer/type.inc.php +++ b/adminer/type.inc.php @@ -22,7 +22,7 @@ if (!$row) {

\n"; + echo "" . confirm() . "\n"; } else { echo "\n"; textarea("as", $row["as"]); diff --git a/adminer/user.inc.php b/adminer/user.inc.php index 9442c487..97b3b4a1 100644 --- a/adminer/user.inc.php +++ b/adminer/user.inc.php @@ -180,6 +180,6 @@ echo "\n"; ?>

-> + diff --git a/adminer/view.inc.php b/adminer/view.inc.php index 9c09a546..fee3fcdf 100644 --- a/adminer/view.inc.php +++ b/adminer/view.inc.php @@ -53,6 +53,6 @@ page_header(($TABLE != "" ? lang('Alter view') : lang('Create view')), $error, a

-> +