mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 03:24:01 +02:00
Use JUSH only with supported drivers
This commit is contained in:
@@ -69,13 +69,15 @@ class Adminer {
|
|||||||
*/
|
*/
|
||||||
function head() {
|
function head() {
|
||||||
global $jush;
|
global $jush;
|
||||||
?>
|
if (support("sql")) {
|
||||||
|
?>
|
||||||
<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">
|
<link rel="stylesheet" type="text/css" href="../externals/jush/jush.css">
|
||||||
<script type="text/javascript" src="../externals/jush/modules/jush.js"></script>
|
<script type="text/javascript" src="../externals/jush/modules/jush.js"></script>
|
||||||
<script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>
|
<script type="text/javascript" src="../externals/jush/modules/jush-textarea.js"></script>
|
||||||
<script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>
|
<script type="text/javascript" src="../externals/jush/modules/jush-txt.js"></script>
|
||||||
<script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
|
<script type="text/javascript" src="../externals/jush/modules/jush-<?php echo $jush; ?>.js"></script>
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -806,17 +808,19 @@ username.form['auth[driver]'].onchange();
|
|||||||
echo "<p class='message'>" . lang('No tables.') . "\n";
|
echo "<p class='message'>" . lang('No tables.') . "\n";
|
||||||
} else {
|
} else {
|
||||||
$this->tablesPrint($tables);
|
$this->tablesPrint($tables);
|
||||||
$links = array();
|
if (support("sql")) {
|
||||||
foreach ($tables as $table => $type) {
|
$links = array();
|
||||||
$links[] = preg_quote($table, '/');
|
foreach ($tables as $table => $type) {
|
||||||
|
$links[] = preg_quote($table, '/');
|
||||||
|
}
|
||||||
|
echo "<script type='text/javascript'>\n";
|
||||||
|
echo "var jushLang = '$jush';\n";
|
||||||
|
echo "var jushLinks = { $jush: [ '" . js_escape(ME) . (support("table") ? "table=" : "select=") . "\$&', /\\b(" . implode("|", $links) . ")\\b/g ] };\n";
|
||||||
|
foreach (array("bac", "bra", "sqlite_quo", "mssql_bra") as $val) {
|
||||||
|
echo "jushLinks.$val = jushLinks.$jush;\n";
|
||||||
|
}
|
||||||
|
echo "</script>\n";
|
||||||
}
|
}
|
||||||
echo "<script type='text/javascript'>\n";
|
|
||||||
echo "var jushLang = '$jush';\n";
|
|
||||||
echo "var jushLinks = { $jush: [ '" . js_escape(ME) . (support("table") ? "table=" : "select=") . "\$&', /\\b(" . implode("|", $links) . ")\\b/g ] };\n";
|
|
||||||
foreach (array("bac", "bra", "sqlite_quo", "mssql_bra") as $val) {
|
|
||||||
echo "jushLinks.$val = jushLinks.$jush;\n";
|
|
||||||
}
|
|
||||||
echo "</script>\n";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user