]> git.joonet.de Git - adminer.git/commitdiff
Avoid qsl in check[]
authorJakub Vrana <jakub@vrana.cz>
Wed, 7 Feb 2018 17:54:57 +0000 (18:54 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 7 Feb 2018 17:55:28 +0000 (18:55 +0100)
Table with 1000 rows rendered in 1.8 instead of 7.5 seconds.

adminer/select.inc.php
adminer/static/functions.js

index 4fdf439f4fe9114dd5e92dc135e7eb95f701211e..ec36873c4c8d82da1f35ea7beeafaa3b94a42219 100644 (file)
@@ -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 "<tr" . odd() . ">" . (!$group && $select ? "" : "<td>"
-                                       . 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) ? "" : " <a href='" . h(ME . "edit=" . urlencode($TABLE) . $unique_idf) . "' class='edit'>" . lang('edit') . "</a>")
                                );
 
index 7bdd88013a0c8de6b0c37b3f4c15b2c87aeb7b62..30c04c7335688895c78d48cfd81b2668a7f7d311 100644 (file)
@@ -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);
 }