]> git.joonet.de Git - adminer.git/commitdiff
Avoid qsl in a loop
authorJakub Vrana <jakub@vrana.cz>
Thu, 8 Feb 2018 08:30:16 +0000 (09:30 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 8 Feb 2018 08:30:16 +0000 (09:30 +0100)
adminer/db.inc.php
adminer/static/functions.js
editor/db.inc.php

index f76164c144d7f70257e78572a1503cf7ce31cd63..d2215629ccd8a5f184192974fa91f3d6c82fc611 100644 (file)
@@ -85,7 +85,7 @@ if ($adminer->homepage()) {
                        foreach ($tables_list as $name => $type) {
                                $view = ($type !== null && !preg_match('~table~i', $type));
                                $id = h("Table-" . $name);
-                               echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "formUncheck('check-all');", "", $id);
+                               echo '<tr' . odd() . '><td>' . checkbox(($view ? "views[]" : "tables[]"), $name, in_array($name, $tables_views, true), "", "", "", $id);
                                echo '<th>' . (support("table") || support("indexes") ? "<a href='" . h(ME) . "table=" . urlencode($name) . "' title='" . lang('Show structure') . "' id='$id'>" . h($name) . '</a>' : h($name));
                                if ($view) {
                                        echo '<td colspan="6"><a href="' . h(ME) . "view=" . urlencode($name) . '" title="' . lang('Alter view') . '">' . (preg_match('~materialized~i', $type) ? lang('Materialized view') : lang('View')) . '</a>';
index 30c04c7335688895c78d48cfd81b2668a7f7d311..907b37f2e7492cbb014cad9a20af4fd66320bb0f 100644 (file)
@@ -277,6 +277,9 @@ function tableClick(event, click) {
                el.form['all'].checked = false;
                formUncheck('all-page');
        }
+       if (/^(tables|views)\[\]$/.test(el.name)) {
+               formUncheck('check-all');
+       }
        trCheck(el);
 }
 
index 5c13f6e62e845b08c41c4fc92f6648d15cfe2890..6cc38b20e74cc61f96e7e47eb8e8be61513b266c 100644 (file)
@@ -18,7 +18,7 @@ if ($adminer->homepage()) {
        foreach (table_status() as $table => $row) {
                $name = $adminer->tableName($row);
                if (isset($row["Engine"]) && $name != "") {
-                       echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true), "", "formUncheck('check-all');");
+                       echo '<tr' . odd() . '><td>' . checkbox("tables[]", $table, in_array($table, (array) $_POST["tables"], true));
                        echo "<th><a href='" . h(ME) . 'select=' . urlencode($table) . "'>$name</a>";
                        $val = format_number($row["Rows"]);
                        echo "<td align='right'><a href='" . h(ME . "edit=") . urlencode($table) . "'>" . ($row["Engine"] == "InnoDB" && $val ? "~ $val" : $val) . "</a>";