From 6a7ee5a2f3dd35e0b34425ca3ce1ea5fb1a27f4a Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Wed, 7 Feb 2018 18:54:57 +0100 Subject: [PATCH] Avoid qsl in check[] Table with 1000 rows rendered in 1.8 instead of 7.5 seconds. --- adminer/select.inc.php | 2 +- adminer/static/functions.js | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 4fdf439f..ec36873c 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -384,7 +384,7 @@ if (!$columns && support("table")) { $unique_idf .= "&" . ($val !== null ? urlencode("where[" . bracket_escape($key) . "]") . "=" . urlencode($val) : "null%5B%5D=" . urlencode($key)); } echo "" . (!$group && $select ? "" : "" - . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"]), "", "this.form['all'].checked = false; formUncheck('all-page');") + . checkbox("check[]", substr($unique_idf, 1), in_array(substr($unique_idf, 1), (array) $_POST["check"])) . ($is_group || information_schema(DB) ? "" : " " . lang('edit') . "") ); diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 7bdd8801..30c04c73 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -273,6 +273,10 @@ function tableClick(event, click) { el.checked = !el.checked; el.onclick && el.onclick(); } + if (el.name == 'check[]') { + el.form['all'].checked = false; + formUncheck('all-page'); + } trCheck(el); }