Avoid qsl in a loop
This commit is contained in:
parent
fb2d34f739
commit
2db1c74310
|
@ -179,11 +179,11 @@ if (DB != "") {
|
||||||
foreach ($tables_list as $name => $type) {
|
foreach ($tables_list as $name => $type) {
|
||||||
$prefix = preg_replace('~_.*~', '', $name);
|
$prefix = preg_replace('~_.*~', '', $name);
|
||||||
$checked = ($TABLE == "" || $TABLE == (substr($TABLE, -1) == "%" ? "$prefix%" : $name)); //! % may be part of table name
|
$checked = ($TABLE == "" || $TABLE == (substr($TABLE, -1) == "%" ? "$prefix%" : $name)); //! % may be part of table name
|
||||||
$print = "<tr><td>" . checkbox("tables[]", $name, $checked, $name, "formUncheck('check-tables');", "block");
|
$print = "<tr><td>" . checkbox("tables[]", $name, $checked, $name, "", "block");
|
||||||
if ($type !== null && !preg_match('~table~i', $type)) {
|
if ($type !== null && !preg_match('~table~i', $type)) {
|
||||||
$views .= "$print\n";
|
$views .= "$print\n";
|
||||||
} else {
|
} else {
|
||||||
echo "$print<td align='right'><label class='block'><span id='Rows-" . h($name) . "'></span>" . checkbox("data[]", $name, $checked, "", "formUncheck('check-data');") . "</label>\n";
|
echo "$print<td align='right'><label class='block'><span id='Rows-" . h($name) . "'></span>" . checkbox("data[]", $name, $checked) . "</label>\n";
|
||||||
}
|
}
|
||||||
$prefixes[$prefix]++;
|
$prefixes[$prefix]++;
|
||||||
}
|
}
|
||||||
|
@ -203,7 +203,7 @@ if (DB != "") {
|
||||||
foreach ($databases as $db) {
|
foreach ($databases as $db) {
|
||||||
if (!information_schema($db)) {
|
if (!information_schema($db)) {
|
||||||
$prefix = preg_replace('~_.*~', '', $db);
|
$prefix = preg_replace('~_.*~', '', $db);
|
||||||
echo "<tr><td>" . checkbox("databases[]", $db, $TABLE == "" || $TABLE == "$prefix%", $db, "formUncheck('check-databases');", "block") . "\n";
|
echo "<tr><td>" . checkbox("databases[]", $db, $TABLE == "" || $TABLE == "$prefix%", $db, "", "block") . "\n";
|
||||||
$prefixes[$prefix]++;
|
$prefixes[$prefix]++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -411,7 +411,12 @@ function partitionNameChange() {
|
||||||
function dumpClick(event) {
|
function dumpClick(event) {
|
||||||
var el = parentTag(getTarget(event), 'label');
|
var el = parentTag(getTarget(event), 'label');
|
||||||
if (el) {
|
if (el) {
|
||||||
checkboxClick.call(el.firstChild, event);
|
el = qs('input', el);
|
||||||
|
var match = /(.+)\[\]$/.exec(el.name);
|
||||||
|
if (match) {
|
||||||
|
checkboxClick.call(el, event);
|
||||||
|
formUncheck('check-' + match[1]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue