MariaDB: Links to documentation in syntax highlighting
This commit is contained in:
parent
cf7fe88990
commit
e299e9d82d
|
@ -960,8 +960,9 @@ class Adminer {
|
||||||
echo "jushLinks.$val = jushLinks.$jush;\n";
|
echo "jushLinks.$val = jushLinks.$jush;\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$server_info = $connection->server_info;
|
||||||
?>
|
?>
|
||||||
bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\\d\\.?\\d).*~s', '\\1', $connection->server_info) : ""); ?>');
|
bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\\d\\.?\\d).*~s', '\\1', $server_info) : ""); ?>'<?php echo (preg_match('~MariaDB~', $server_info) ? ", true" : ""); ?>);
|
||||||
</script>
|
</script>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,9 @@
|
||||||
|
|
||||||
/** Load syntax highlighting
|
/** Load syntax highlighting
|
||||||
* @param string first three characters of database system version
|
* @param string first three characters of database system version
|
||||||
|
* @param [boolean]
|
||||||
*/
|
*/
|
||||||
function bodyLoad(version) {
|
function bodyLoad(version, maria) {
|
||||||
if (window.jush) {
|
if (window.jush) {
|
||||||
jush.create_links = ' target="_blank" rel="noreferrer noopener"';
|
jush.create_links = ' target="_blank" rel="noreferrer noopener"';
|
||||||
if (version) {
|
if (version) {
|
||||||
|
@ -12,8 +13,14 @@ function bodyLoad(version) {
|
||||||
if (typeof obj[key] != 'string') {
|
if (typeof obj[key] != 'string') {
|
||||||
obj = obj[key];
|
obj = obj[key];
|
||||||
key = 0;
|
key = 0;
|
||||||
|
if (maria) {
|
||||||
|
for (var i = 1; i < obj.length; i++) {
|
||||||
|
obj[i] = obj[i].replace(/\.html/, '/');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
obj[key] = obj[key]
|
obj[key] = obj[key]
|
||||||
|
.replace(/dev\.mysql\.com\/doc\/mysql\/en\//, (maria ? 'mariadb.com/kb/en/library/' : '$&')) // MariaDB
|
||||||
.replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
|
.replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
|
||||||
.replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
|
.replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
|
||||||
;
|
;
|
||||||
|
|
2
externals/jush
vendored
2
externals/jush
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit b1801c40d9cf4d68b7d1c8085f4f95c26c0c6a9e
|
Subproject commit 275c9cc888608f36895e3926c16e8d2e2dab0a1c
|
Loading…
Reference in a new issue