1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-10 00:28:34 +02:00

Fix links to PostgreSQL 10 documentation

This commit is contained in:
Jakub Vrana
2018-02-01 14:02:25 +01:00
parent b9ad864b75
commit 2e6190fdf1
2 changed files with 4 additions and 3 deletions

View File

@@ -948,7 +948,7 @@ class Adminer {
} }
} }
?> ?>
bodyLoad('<?php echo (is_object($connection) ? substr($connection->server_info, 0, 3) : ""); ?>'); bodyLoad('<?php echo (is_object($connection) ? preg_replace('~^(\\d\\.?\\d).*~s', '\\1', $connection->server_info) : ""); ?>');
</script> </script>
<?php <?php
} }

View File

@@ -487,10 +487,11 @@ function ini_bytes($ini) {
*/ */
function doc_link($paths) { function doc_link($paths) {
global $jush, $connection; global $jush, $connection;
$version = preg_replace('~^(\\d\\.?\\d).*~s', '\\1', $connection->server_info);
$urls = array( $urls = array(
'sql' => "https://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/", 'sql' => "https://dev.mysql.com/doc/refman/$version/en/",
'sqlite' => "https://www.sqlite.org/", 'sqlite' => "https://www.sqlite.org/",
'pgsql' => "https://www.postgresql.org/docs/" . substr($connection->server_info, 0, 3) . "/static/", 'pgsql' => "https://www.postgresql.org/docs/$version/static/",
'mssql' => "https://msdn.microsoft.com/library/", 'mssql' => "https://msdn.microsoft.com/library/",
'oracle' => "https://download.oracle.com/docs/cd/B19306_01/server.102/b14200/", 'oracle' => "https://download.oracle.com/docs/cd/B19306_01/server.102/b14200/",
); );