diff --git a/adminer/db.inc.php b/adminer/db.inc.php index b93ca700..a341d1b9 100644 --- a/adminer/db.inc.php +++ b/adminer/db.inc.php @@ -135,7 +135,7 @@ if ($adminer->homepage()) { echo (support("copy") ? " " : ""); echo "\n"; } - echo "\n"; // used by trCheck() + echo "\n"; // used by trCheck() echo "\n"; echo "\n"; } diff --git a/adminer/include/connect.inc.php b/adminer/include/connect.inc.php index 40074132..061475a1 100644 --- a/adminer/include/connect.inc.php +++ b/adminer/include/connect.inc.php @@ -56,7 +56,7 @@ function connect_error() { echo "\n"; echo (support("database") ? "
\n" : "" diff --git a/adminer/select.inc.php b/adminer/select.inc.php index 191b28a7..8ccaeeda 100644 --- a/adminer/select.inc.php +++ b/adminer/select.inc.php @@ -488,7 +488,7 @@ if (!$columns && support("table")) { echo "\n"; echo ($found_rows !== false ? "(" . ($exact_count ? "" : "~ ") . lang('%d row(s)', $found_rows) . ") " : ""); $display_rows = ($exact_count ? "" : "~ ") . $found_rows; - echo checkbox("all", 1, 0, lang('whole result'), "var checked = formChecked.call(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n"; + echo checkbox("all", 1, 0, lang('whole result'), "var checked = formChecked(this, /check/); selectCount('selected', this.checked ? '$display_rows' : checked); selectCount('selected2', this.checked || !checked ? '$display_rows' : checked);") . "\n"; if ($adminer->selectCommandPrint()) { ?> diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 582979c2..f43e3a91 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -172,13 +172,13 @@ function formUncheck(id) { } /** Get number of checked elements matching given name +* @param HTMLInputElement * @param RegExp * @return number -* @this HTMLInputElement */ -function formChecked(name) { +function formChecked(el, name) { var checked = 0; - var elems = this.form.elements; + var elems = el.form.elements; for (var i=0; i < elems.length; i++) { if (name.test(elems[i].name) && elems[i].checked) { checked++;