Avoid qsl in check[]

Table with 1000 rows rendered in 1.8 instead of 7.5 seconds.
This commit is contained in:
Jakub Vrana 2018-02-07 18:54:57 +01:00
parent 4b45722fad
commit 6a7ee5a2f3
2 changed files with 5 additions and 1 deletions

View 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>")
);

View 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);
}