]> git.joonet.de Git - adminer.git/commitdiff
Save bytes
authorJakub Vrana <jakub@vrana.cz>
Wed, 28 Aug 2019 08:30:54 +0000 (10:30 +0200)
committerJakub Vrana <jakub@vrana.cz>
Wed, 28 Aug 2019 08:30:54 +0000 (10:30 +0200)
adminer/db.inc.php
adminer/include/editing.inc.php

index 414de59effe8d61ffbb5cdc6eb42088ec8ba0f6b..288d113ff67fd622a70adac80d3b60426772ec61 100644 (file)
@@ -65,7 +65,6 @@ if ($adminer->homepage()) {
                                        search_tables();
                                }
                        }
-                       $doc_link = doc_link(array('sql' => 'show-table-status.html'));
                        echo "<div class='scrollable'>\n";
                        echo "<table cellspacing='0' class='nowrap checkable'>\n";
                        echo script("mixin(qsl('table'), {onclick: tableClick, ondblclick: partialArg(tableClick, true)});");
@@ -76,7 +75,7 @@ if ($adminer->homepage()) {
                        echo '<td>' . lang('Collation') . doc_link(array('sql' => 'charset-charsets.html', 'mariadb' => 'supported-character-sets-and-collations/'));
                        echo '<td>' . lang('Data Length') . doc_link(array('sql' => 'show-table-status.html', 'pgsql' => 'functions-admin.html#FUNCTIONS-ADMIN-DBOBJECT', 'oracle' => 'REFRN20286'));
                        echo '<td>' . lang('Index Length') . doc_link(array('sql' => 'show-table-status.html', 'pgsql' => 'functions-admin.html#FUNCTIONS-ADMIN-DBOBJECT'));
-                       echo '<td>' . lang('Data Free') . $doc_link;
+                       echo '<td>' . lang('Data Free') . doc_link(array('sql' => 'show-table-status.html'));
                        echo '<td>' . lang('Auto Increment') . doc_link(array('sql' => 'example-auto-increment.html', 'mariadb' => 'auto_increment/'));
                        echo '<td>' . lang('Rows') . doc_link(array('sql' => 'show-table-status.html', 'pgsql' => 'catalog-pg-class.html#CATALOG-PG-CLASS', 'oracle' => 'REFRN20286'));
                        echo (support("comment") ? '<td>' . lang('Comment') . doc_link(array('sql' => 'show-table-status.html', 'pgsql' => 'functions-info.html#FUNCTIONS-INFO-COMMENT-TABLE')) : '');
index 81577801880cec0168d4f3fbf44e10102c638312..9dea07190cad0e68a84fe6e52982aba14e9b56c5 100644 (file)
@@ -528,15 +528,12 @@ function doc_link($paths, $text = "<sup>?</sup>") {
        global $jush, $connection;
        $server_info = $connection->server_info;
        $version = preg_replace('~^(\d\.?\d).*~s', '\1', $server_info); // two most significant digits
-       if (preg_match('~Oracle~', $server_info)) {
-               $version = preg_replace('~^.* (\d+)\.(\d+)\.\d+\.\d+\.\d+.*~s', '\1\2', $server_info);
-       }
        $urls = array(
                'sql' => "https://dev.mysql.com/doc/refman/$version/en/",
                'sqlite' => "https://www.sqlite.org/",
                'pgsql' => "https://www.postgresql.org/docs/$version/static/",
                'mssql' => "https://msdn.microsoft.com/library/",
-               'oracle' => "https://www.oracle.com/pls/topic/lookup?ctx=db$version&id=",
+               '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/";