Fix info of collation is wrong on log

This commit is contained in:
Laurent Destailleur 2018-01-19 12:10:03 +01:00
parent 937a27396f
commit a892a3fe71
2 changed files with 4 additions and 2 deletions

View File

@ -903,7 +903,8 @@ class DoliDBMysqli extends DoliDB
}
/**
* Return charset used to store data in current database (same result than using SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "databasename";)
* Return charset used to store data in current database
* Note: if we are connected to databasename, it is same result than using SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "databasename";)
*
* @return string Charset
* @see getDefaultCollationDatabase

View File

@ -661,9 +661,10 @@ if (! $error && $db->connected && $action == "set")
print '</td>';
print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
$newdb->select_db($dolibarr_main_db_name);
$check1=$newdb->getDefaultCharacterSetDatabase();
$check2=$newdb->getDefaultCollationDatabase();
dolibarr_install_syslog('step1: note that new database is using charset=' . $check1 . ' collation=' . $check2);
dolibarr_install_syslog('step1: new database is using charset=' . $check1 . ' collation=' . $check2);
// If values differs, we save conf file again
//if ($check1 != $dolibarr_main_db_character_set) dolibarr_install_syslog('step1: value for character_set is not the one asked for database creation', LOG_WARNING);