diff --git a/ChangeLog b/ChangeLog index 7849652e565..b2116bde26a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ For translators: For developers: - New: DolGraph can build graph with three lines. - New: Can enable tuning info from option MAIN_SHOW_TUNING_INFO. +- New: Show version of client lib used by mysql drivers ***** ChangeLog for 3.4 compared to 3.3.2 ***** diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index 211731d4332..4bd9ed2d053 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2004 Sebastien Di Cintio * Copyright (C) 2004 Benoit Mortier * @@ -48,7 +48,7 @@ print ''.$langs->trans("Version").''.get print ''.$langs->trans("DatabaseServer").''.$conf->db->host.''."\n"; print ''.$langs->trans("DatabasePort").''.(empty($conf->db->port)?$langs->trans("Default"):$conf->db->port).''."\n"; print ''.$langs->trans("DatabaseName").''.$conf->db->name.''."\n"; -print ''.$langs->trans("DriverType").''.$conf->db->type .''."\n"; +print ''.$langs->trans("DriverType").''.$conf->db->type . ($db->getDriverInfo() ? ' ('.$db->getDriverInfo().')':'').''."\n"; print ''.$langs->trans("User").''.$conf->db->user.''."\n"; print ''.$langs->trans("Password").''.preg_replace('/./i','*',$dolibarr_main_db_pass).''."\n"; print ''.$langs->trans("DBStoringCharset").''.$db->getDefaultCharacterSetDatabase().''."\n"; diff --git a/htdocs/core/db/mssql.class.php b/htdocs/core/db/mssql.class.php index 9378cc20694..09580459447 100644 --- a/htdocs/core/db/mssql.class.php +++ b/htdocs/core/db/mssql.class.php @@ -229,7 +229,16 @@ class DoliDBMssql return explode('.',$this->getVersion()); } - + /** + * Return version of database client driver + * + * @return string Version string + */ + function getDriverInfo() + { + return ''; + } + /** * Close database connexion * diff --git a/htdocs/core/db/mysql.class.php b/htdocs/core/db/mysql.class.php index 287fba04bcc..3d7de70c5b0 100644 --- a/htdocs/core/db/mysql.class.php +++ b/htdocs/core/db/mysql.class.php @@ -256,7 +256,17 @@ class DoliDBMysql { return explode('.',$this->getVersion()); } - + + /** + * Return version of database client driver + * + * @return string Version string + */ + function getDriverInfo() + { + return mysqli_get_client_info(); + } + /** * Close database connexion diff --git a/htdocs/core/db/mysqli.class.php b/htdocs/core/db/mysqli.class.php index 2ae51e7def5..9e3eba7704d 100644 --- a/htdocs/core/db/mysqli.class.php +++ b/htdocs/core/db/mysqli.class.php @@ -252,6 +252,16 @@ class DoliDBMysqli return explode('.',$this->getVersion()); } + /** + * Return version of database client driver + * + * @return string Version string + */ + function getDriverInfo() + { + return mysqli_get_client_info($this->db); + } + /** * Close database connexion diff --git a/htdocs/core/db/pgsql.class.php b/htdocs/core/db/pgsql.class.php index 2173738f4d5..d10f1bc8d47 100644 --- a/htdocs/core/db/pgsql.class.php +++ b/htdocs/core/db/pgsql.class.php @@ -452,6 +452,16 @@ class DoliDBPgsql return explode('.',$this->getVersion()); } + /** + * Return version of database client driver + * + * @return string Version string + */ + function getDriverInfo() + { + return ''; + } + /** * Close database connexion * diff --git a/htdocs/core/db/sqlite.class.php b/htdocs/core/db/sqlite.class.php index 3034a0f09f5..ec4890a01e0 100644 --- a/htdocs/core/db/sqlite.class.php +++ b/htdocs/core/db/sqlite.class.php @@ -381,7 +381,17 @@ class DoliDBSqlite return explode('.',$this->getVersion()); } - + /** + * Return version of database client driver + * + * @return string Version string + */ + function getDriverInfo() + { + return ''; + } + + /** * Close database connexion *