mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 03:24:01 +02:00
JS: Use let/const for globals
This commit is contained in:
@@ -484,7 +484,7 @@ class Adminer {
|
||||
echo "<input type='submit' value='" . lang('Select') . "'>";
|
||||
echo " <span id='noindex' title='" . lang('Full table scan') . "'></span>";
|
||||
echo "<script" . nonce() . ">\n";
|
||||
echo "var indexColumns = ";
|
||||
echo "const indexColumns = ";
|
||||
$columns = array();
|
||||
foreach ($indexes as $index) {
|
||||
$current_key = reset($index["columns"]);
|
||||
|
@@ -72,8 +72,8 @@ fQIDAQAB
|
||||
. (isset($_COOKIE["adminer_version"]) ? "" : ", onload: partial(verifyVersion, '$VERSION', '" . js_escape(ME) . "', '" . get_token() . "')") // $token may be empty in auth.inc.php
|
||||
. "});
|
||||
document.body.className = document.body.className.replace(/ nojs/, ' js');
|
||||
var offlineMessage = '" . js_escape(lang('You are offline.')) . "';
|
||||
var thousandsSeparator = '" . js_escape(lang(',')) . "';")
|
||||
const offlineMessage = '" . js_escape(lang('You are offline.')) . "';
|
||||
const thousandsSeparator = '" . js_escape(lang(',')) . "';")
|
||||
;
|
||||
echo "<div id='help' class='jush-" . JUSH . " jsonly hidden'></div>\n";
|
||||
echo script("mixin(qs('#help'), {onmouseover: function () { helpOpen = 1; }, onmouseout: helpMouseout});");
|
||||
|
@@ -974,7 +974,7 @@ function slow_query($query) {
|
||||
$connection2 = null;
|
||||
if (!$slow_query && support("kill") && is_object($connection2 = connect($adminer->credentials())) && ($db == "" || $connection2->select_db($db))) {
|
||||
$kill = $connection2->result(connection_id()); // MySQL and MySQLi can use thread_id but it's not in PDO_MySQL
|
||||
echo script("var timeout = setTimeout(function () { ajax('" . js_escape(ME) . "script=kill', function () {}, 'kill=$kill&token=$token'); }, 1000 * $timeout);");
|
||||
echo script("const timeout = setTimeout(function () { ajax('" . js_escape(ME) . "script=kill', function () {}, 'kill=$kill&token=$token'); }, 1000 * $timeout);");
|
||||
}
|
||||
ob_flush();
|
||||
flush();
|
||||
|
Reference in New Issue
Block a user