mirror of
https://github.com/vrana/adminer.git
synced 2025-08-05 06:07:57 +02:00
Link routines from syntax highlighting
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
- Warn about exceeded max_file_uploads in import
|
- Warn about exceeded max_file_uploads in import
|
||||||
- Display @ after username without server in existing logins
|
- Display @ after username without server in existing logins
|
||||||
- Display data length and index length for materialized views
|
- Display data length and index length for materialized views
|
||||||
|
- Link routines from syntax highlighting
|
||||||
- MySQL 5.0-: Do not load partitioning info in alter table (bug #1099)
|
- MySQL 5.0-: Do not load partitioning info in alter table (bug #1099)
|
||||||
- MariaDB: Parse COLLATE in routine definition (bug #1104)
|
- MariaDB: Parse COLLATE in routine definition (bug #1104)
|
||||||
- PostgreSQL: Show structure of inherited tables
|
- PostgreSQL: Show structure of inherited tables
|
||||||
|
@@ -1048,7 +1048,15 @@ class Adminer {
|
|||||||
foreach ($tables as $table => $type) {
|
foreach ($tables as $table => $type) {
|
||||||
$links[] = preg_quote($table, '/');
|
$links[] = preg_quote($table, '/');
|
||||||
}
|
}
|
||||||
echo "var jushLinks = { " . JUSH . ": [ '" . js_escape(ME) . (support("table") ? "table=" : "select=") . "\$&', /\\b(" . implode("|", $links) . ")\\b/g ] };\n";
|
echo "var jushLinks = { " . JUSH . ":";
|
||||||
|
json_row(js_escape(ME) . (support("table") ? "table" : "select") . '=$&', '/\b(' . implode('|', $links) . ')\b/g', false);
|
||||||
|
if (support('routine')) {
|
||||||
|
foreach (routines() as $row) {
|
||||||
|
json_row(js_escape(ME) . 'function=' . urlencode($row["SPECIFIC_NAME"]) . '&name=$&', '/\b' . preg_quote($row["ROUTINE_NAME"], '/') . '(?=["`]?\()/g', false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
json_row('');
|
||||||
|
echo "};\n";
|
||||||
foreach (array("bac", "bra", "sqlite_quo", "mssql_bra") as $val) {
|
foreach (array("bac", "bra", "sqlite_quo", "mssql_bra") as $val) {
|
||||||
echo "jushLinks.$val = jushLinks." . JUSH . ";\n";
|
echo "jushLinks.$val = jushLinks." . JUSH . ";\n";
|
||||||
}
|
}
|
||||||
|
@@ -150,13 +150,13 @@ function select_input(string $attrs, array $options, ?string $value = "", string
|
|||||||
* @param string $key or "" to close the object
|
* @param string $key or "" to close the object
|
||||||
* @param string|int $val
|
* @param string|int $val
|
||||||
*/
|
*/
|
||||||
function json_row(string $key, $val = null): void {
|
function json_row(string $key, $val = null, bool $escape = true): void {
|
||||||
static $first = true;
|
static $first = true;
|
||||||
if ($first) {
|
if ($first) {
|
||||||
echo "{";
|
echo "{";
|
||||||
}
|
}
|
||||||
if ($key != "") {
|
if ($key != "") {
|
||||||
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\t\"\\/") . '": ' . ($val !== null ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : 'null');
|
echo ($first ? "" : ",") . "\n\t\"" . addcslashes($key, "\r\n\t\"\\/") . '": ' . ($val !== null ? ($escape ? '"' . addcslashes($val, "\r\n\"\\/") . '"' : $val) : 'null');
|
||||||
$first = false;
|
$first = false;
|
||||||
} else {
|
} else {
|
||||||
echo "\n}\n";
|
echo "\n}\n";
|
||||||
|
2
externals/jush
vendored
2
externals/jush
vendored
Submodule externals/jush updated: 52a7d5cadb...2f564fdbdb
Reference in New Issue
Block a user