New: Show version of client lib used by mysql drivers

This commit is contained in:
Laurent Destailleur 2013-06-07 19:19:11 +02:00
parent 0806d00b47
commit c3f5e0c6ee
7 changed files with 55 additions and 5 deletions

View File

@ -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 *****

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
*
@ -48,7 +48,7 @@ print '<tr '.$bc[0].'><td width="300">'.$langs->trans("Version").'</td><td>'.get
print '<tr '.$bc[1].'><td width="300">'.$langs->trans("DatabaseServer").'</td><td>'.$conf->db->host.'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("DatabasePort").'</td><td>'.(empty($conf->db->port)?$langs->trans("Default"):$conf->db->port).'</td></tr>'."\n";
print '<tr '.$bc[1].'><td width="300">'.$langs->trans("DatabaseName").'</td><td>'.$conf->db->name.'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("DriverType").'</td><td>'.$conf->db->type .'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("DriverType").'</td><td>'.$conf->db->type . ($db->getDriverInfo() ? ' ('.$db->getDriverInfo().')':'').'</td></tr>'."\n";
print '<tr '.$bc[1].'><td width="300">'.$langs->trans("User").'</td><td>'.$conf->db->user.'</td></tr>'."\n";
print '<tr '.$bc[0].'><td width="300">'.$langs->trans("Password").'</td><td>'.preg_replace('/./i','*',$dolibarr_main_db_pass).'</td></tr>'."\n";
print '<tr '.$bc[1].'><td width="300">'.$langs->trans("DBStoringCharset").'</td><td>'.$db->getDefaultCharacterSetDatabase().'</td></tr>'."\n";

View File

@ -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
*

View File

@ -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

View File

@ -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

View File

@ -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
*

View File

@ -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
*