]> git.joonet.de Git - adminer.git/commitdiff
MariaDB: Fix several links to documentation pages
authorPeter Knut <peter@pematon.com>
Wed, 23 Oct 2024 21:19:47 +0000 (23:19 +0200)
committerJakub Vrana <jakub@vrana.cz>
Wed, 19 Feb 2025 10:16:41 +0000 (11:16 +0100)
adminer/include/editing.inc.php
adminer/static/editing.js

index 49bef234aedeb5c3caf0ce0ce358b5ebc79fa3a0..5181bebad41be6e1e2e877bc77b6a72b9c9d3cdb 100644 (file)
@@ -547,7 +547,7 @@ function doc_link($paths, $text = "<sup>?</sup>") {
                'oracle' => "https://www.oracle.com/pls/topic/lookup?ctx=db" . preg_replace('~^.* (\d+)\.(\d+)\.\d+\.\d+\.\d+.*~s', '\1\2', $server_info) . "&id=",
        );
        if (preg_match('~MariaDB~', $server_info)) {
-               $urls['sql'] = "https://mariadb.com/kb/en/library/";
+               $urls['sql'] = "https://mariadb.com/kb/en/";
                $paths['sql'] = (isset($paths['mariadb']) ? $paths['mariadb'] : str_replace(".html", "/", $paths['sql']));
        }
        return ($paths[$jush] ? "<a href='" . h($urls[$jush] . $paths[$jush]) . "'" . target_blank() . ">$text</a>" : "");
index 990079048eeca512369e77b28e02b449e6ef16cd..d91e1f8b801c5f3f32d211942d3fd4262dbde6da 100644 (file)
@@ -16,17 +16,22 @@ function bodyLoad(version, maria) {
                                        if (maria) {
                                                for (var i = 1; i < obj.length; i++) {
                                                        obj[i] = obj[i]
-                                                               .replace(/\.html/, '/')
-                                                               .replace(/-type-syntax/, '-data-types')
+                                                               .replace('.html', '/')
+                                                               .replace('-type-syntax', '-data-types')
                                                                .replace(/numeric-(data-types)/, '$1-$&')
-                                                               .replace(/#statvar_.*/, '#$$1')
+                                                               .replace(/replication-options-(master|binary-log)\//, 'replication-and-binary-log-system-variables/')
+                                                               .replace('server-options/', 'server-system-variables/')
+                                                               .replace('innodb-parameters/', 'innodb-system-variables/')
+                                                               .replace(/#(statvar|sysvar|option_mysqld)_(.*)/, '#$2')
+                                                               .replace(/#sysvar_(.*)/, '#$1')
                                                        ;
                                                }
                                        }
                                }
-                               obj[key] = (maria ? obj[key].replace(/dev\.mysql\.com\/doc\/mysql\/en\//, 'mariadb.com/kb/en/library/') : obj[key]) // MariaDB
-                                       .replace(/\/doc\/mysql/, '/doc/refman/' + version) // MySQL
-                                       .replace(/\/docs\/current/, '/docs/' + version) // PostgreSQL
+
+                               obj[key] = (maria ? obj[key].replace('dev.mysql.com/doc/mysql/en/', 'mariadb.com/kb/en/') : obj[key]) // MariaDB
+                                       .replace('/doc/mysql/', '/doc/refman/' + version) // MySQL
+                                       .replace('/docs/current/', '/docs/' + version) // PostgreSQL
                                ;
                        }
                }