From 9d26ccb801c74d3bf716e0cbc4f41eec857164e5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 18 Nov 2023 19:03:47 +0100 Subject: [PATCH] Missing dbversion --- htdocs/core/lib/functions2.lib.php | 14 ++++++++++++++ htdocs/main.inc.php | 5 +++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 2a055759a12..d5144f00efb 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -1883,6 +1883,20 @@ function version_php() return phpversion(); } +/** + * Return DB version + * + * @return string PHP version + */ +function version_db() +{ + global $db; + if (is_object($db, 'getVersion')) { + return $db->getVersion(); + } + return ''; +} + /** * Return Dolibarr version * diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index ddc01b9a352..654648a35f7 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -2981,14 +2981,14 @@ function top_menu_search() // prevent submiting form on press ENTER jQuery("#top-global-search-input").keydown(function (e) { - if (e.keyCode == 13 || e.keyCode == 40) { + if (e.keyCode == 13 || e.keyCode == 40) { var inputs = $(this).parents("form").eq(0).find(":button"); if (inputs[inputs.index(this) + 1] != null) { inputs[inputs.index(this) + 1].focus(); if (e.keyCode == 13){ inputs[inputs.index(this) + 1].trigger("click"); } - + } e.preventDefault(); return false; @@ -3695,6 +3695,7 @@ if (!function_exists("llxFooter")) { country_code: 'country_code ? dol_escape_js($mysoc->country_code) : 'unknown'; ?>', php_version: '', os_version: '', + db_version: '', distrib: '', token: 'notrequired' },