Use connection() instead of $connection

This commit is contained in:
Jakub Vrana
2025-03-29 21:16:28 +01:00
parent 168ea5ae6d
commit 712d96b22c
36 changed files with 130 additions and 196 deletions

View File

@@ -15,7 +15,6 @@ class AdminerCodemirror {
}
function syntaxHighlighting($tableStatuses) {
$connection = Adminer\connection();
?>
<style>
@import url(<?php echo $this->root; ?>/lib/codemirror.css);
@@ -44,7 +43,7 @@ function getCmMode(el) {
if (match) {
const modes = {
js: 'application/json',
sql: 'text/x-<?php echo ($connection->flavor == "maria" ? "mariadb" : "mysql"); ?>',
sql: 'text/x-<?php echo (Adminer\connection()->flavor == "maria" ? "mariadb" : "mysql"); ?>',
oracle: 'text/x-sql',
clickhouse: 'text/x-sql',
firebird: 'text/x-sql'