]> git.joonet.de Git - adminer.git/commitdiff
Link used MySQL version in syntax highlighting
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 16 Dec 2009 13:05:22 +0000 (13:05 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 16 Dec 2009 13:05:22 +0000 (13:05 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1269 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/include/design.inc.php
adminer/static/editing.js
editor/static/editing.js

index 4e645dda36f44d6c0a13eb999f04b5b8ace4a82b..d1375d6112ca49cedf2c3db3cb8ff6411d91dadb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
-       global $LANG, $VERSION, $adminer;
+       global $LANG, $VERSION, $adminer, $connection;
        header("Content-Type: text/html; charset=utf-8");
        header("X-Frame-Options: deny"); // ClickJacking protection in IE8, Safari 4, Chrome 2, NoScript plugin
        $title_all = $title . (strlen($title2) ? ": " . h($title2) : "");
@@ -17,7 +17,7 @@ function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
 <link rel="stylesheet" type="text/css" href="adminer.css">
 <?php } ?>
 
-<body onload="body_load();<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verify_version();"); ?>">
+<body onload="body_load(<?php echo substr($connection->server_info, 0, 3); ?>);<?php echo (isset($_COOKIE["adminer_version"]) ? "" : " verify_version();"); ?>">
 <script type="text/javascript" src="../adminer/static/functions.js"></script>
 <script type="text/javascript" src="static/editing.js"></script>
 
index 54dde1bb1b5bd8c20ec5ae44894b6e4f887995f4..3b86349550cb50287209bdd0fbd94bd4b2098d5e 100644 (file)
@@ -1,12 +1,14 @@
 // Adminer specific functions
 
-function body_load() {
+function body_load(version) {
        var jush_root = '../externals/jush/';
        var script = document.createElement('script');
        script.src = jush_root + 'jush.js';
        script.onload = function () {
                if (window.jush) { // IE runs in case of an error too
                        jush.create_links = ' target="_blank"';
+                       jush.urls.sql[0] = 'http://dev.mysql.com/doc/refman/' + version + '/en/$key';
+                       jush.urls.sql[0] = jush.urls.sql[0];
                        jush.style(jush_root + 'jush.css');
                        jush.highlight_tag('pre', 0);
                        jush.highlight_tag('code');
index 6cf5307084df7713b2db5a160046e05143fbd490..43289cdf1ca4188bb9c7bc276207219a217e6b66 100644 (file)
@@ -1,4 +1,4 @@
 // Editor specific functions
 
-function body_load() {
+function body_load(version) {
 }