mirror of
https://github.com/vrana/adminer.git
synced 2025-08-07 15:16:44 +02:00
Autocomplete: Populate only on pages where useful
This commit is contained in:
@@ -1026,6 +1026,7 @@ class Adminer {
|
||||
foreach (array("bac", "bra", "sqlite_quo", "mssql_bra") as $val) {
|
||||
echo "jushLinks.$val = jushLinks." . JUSH . ";\n";
|
||||
}
|
||||
if (isset($_GET["sql"]) || isset($_GET["trigger"]) || isset($_GET["check"])) {
|
||||
$tablesColumns = array_fill_keys(array_keys($tables), array());
|
||||
foreach (driver()->allFields() as $table => $fields) {
|
||||
foreach ($fields as $field) {
|
||||
@@ -1034,6 +1035,7 @@ class Adminer {
|
||||
}
|
||||
echo "addEventListener('DOMContentLoaded', () => { autocompleter = jush.autocompleteSql('" . idf_escape("") . "', " . json_encode($tablesColumns) . "); });\n";
|
||||
}
|
||||
}
|
||||
echo "</script>\n";
|
||||
}
|
||||
echo script("syntaxHighlighting('" . preg_replace('~^(\d\.?\d).*~s', '\1', connection()->server_info) . "', '" . connection()->flavor . "');");
|
||||
|
Reference in New Issue
Block a user