mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 01:54:00 +02:00
Avoid qsl in a loop
Table with 500 rows rendered in 1.5 instead of 5.5 seconds.
This commit is contained in:
@@ -440,8 +440,10 @@ if (!$columns && support("table")) {
|
||||
echo "<td>" . ($text ? "<textarea name='$id' cols='30' rows='" . (substr_count($row[$key], "\n") + 1) . "'>$h_value</textarea>" : "<input name='$id' value='$h_value' size='$lengths[$key]'>");
|
||||
} else {
|
||||
$long = strpos($val, "<i>...</i>");
|
||||
echo "<td id='$id'>$val</td>";
|
||||
echo script("qsl('td').onclick = partialArg(selectClick, " . ($long ? 2 : ($text ? 1 : 0)) . ($editable ? "" : ", '" . h(lang('Use edit link to modify this value.')) . "'") . ");", "");
|
||||
echo "<td id='$id' data-text='" . ($long ? 2 : ($text ? 1 : 0)) . "'"
|
||||
. ($editable ? "" : " data-warning='" . h(lang('Use edit link to modify this value.')) . "'")
|
||||
. ">$val</td>"
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user