Fix: Removed warnings

This commit is contained in:
Laurent Destailleur 2012-04-30 09:33:43 +02:00
parent 4132b51936
commit 29fdb33406
5 changed files with 9 additions and 6 deletions

View File

@ -796,9 +796,12 @@ class DoliDBMssql
*/
function DDLCreateDb($database,$charset='',$collation='',$owner='')
{
// ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci
if (empty($charset)) $charset=$this->forcecharset;
if (empty($collation)) $collation=$this->forcecollate;
// ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci
$sql = 'CREATE DATABASE '.$database;
$sql.= ' DEFAULT CHARACTER SET '.$this->forcecharset.' DEFAULT COLLATE '.$this->forcecollate;
$sql.= ' DEFAULT CHARACTER SET '.$charset.' DEFAULT COLLATE '.$collation;
$ret=$this->query($sql);
if (! $ret)
{

View File

@ -797,7 +797,7 @@ class DoliDBMysql
function DDLCreateDb($database,$charset='',$collation='',$owner='')
{
if (empty($charset)) $charset=$this->forcecharset;
if (empty($collation)) $collation=$this->collation;
if (empty($collation)) $collation=$this->forcecollate;
// ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci
$sql = 'CREATE DATABASE '.$database;

View File

@ -791,7 +791,7 @@ class DoliDBMysqli
function DDLCreateDb($database,$charset='',$collation='',$owner='')
{
if (empty($charset)) $charset=$this->forcecharset;
if (empty($collation)) $collation=$this->collation;
if (empty($collation)) $collation=$this->forcecollate;
// ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci
$sql = 'CREATE DATABASE '.$database;

View File

@ -979,7 +979,7 @@ class DoliDBPgsql
function DDLCreateDb($database,$charset='',$collation='',$owner='')
{
if (empty($charset)) $charset=$this->forcecharset;
if (empty($collation)) $collation=$this->collation;
if (empty($collation)) $collation=$this->forcecollate;
$ret=$this->query('CREATE DATABASE '.$database.' OWNER '.$owner.' ENCODING \''.$charset.'\'');
return $ret;

View File

@ -939,7 +939,7 @@ class DoliDBSqlite
function DDLCreateDb($database,$charset='',$collation='',$owner='')
{
if (empty($charset)) $charset=$this->forcecharset;
if (empty($collation)) $collation=$this->collation;
if (empty($collation)) $collation=$this->forcecollate;
// ALTER DATABASE dolibarr_db DEFAULT CHARACTER SET latin DEFAULT COLLATE latin1_swedish_ci
$sql = 'CREATE DATABASE '.$database;