forked from Wavyzz/dolibarr
Fix: Status of db hanlder not modified on disconnect
This commit is contained in:
@@ -231,14 +231,19 @@ class DoliDb
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fermeture d'une connexion vers une database.
|
||||
* \return resource
|
||||
* \see connect
|
||||
* Close database connexion
|
||||
* @return boolean True if disconnect successfull, false otherwise
|
||||
* @see connect
|
||||
*/
|
||||
function close()
|
||||
{
|
||||
dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||
return $this->db?mssql_close($this->db):0;
|
||||
if ($this->db)
|
||||
{
|
||||
//dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||
$this->connected=0;
|
||||
return mssql_close($this->db);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -275,14 +275,19 @@ class DoliDb
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fermeture d'une connexion vers une database.
|
||||
* \return resource
|
||||
* \seealso connect
|
||||
* Close database connexion
|
||||
* @return boolean True if disconnect successfull, false otherwise
|
||||
* @see connect
|
||||
*/
|
||||
function close()
|
||||
{
|
||||
dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||
return ($this->db?mysql_close($this->db):0);
|
||||
if ($this->db)
|
||||
{
|
||||
//dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||
$this->connected=0;
|
||||
return mysql_close($this->db);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -282,14 +282,19 @@ class DoliDb
|
||||
|
||||
|
||||
/**
|
||||
* \brief Fermeture d'une connexion vers une database.
|
||||
* \return resource
|
||||
* \seealso connect
|
||||
* Close database connexion
|
||||
* @return boolean True if disconnect successfull, false otherwise
|
||||
* @see connect
|
||||
*/
|
||||
function close()
|
||||
{
|
||||
dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||
return $this->db?mysqli_close($this->db):0;
|
||||
if ($this->db)
|
||||
{
|
||||
//dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||
$this->connected=0;
|
||||
return mysqli_close($this->db);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -415,13 +415,19 @@ class DoliDb
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Fermeture d'une connexion vers une database.
|
||||
* \return resource
|
||||
* Close database connexion
|
||||
* @return boolean True if disconnect successfull, false otherwise
|
||||
* @see connect
|
||||
*/
|
||||
function close()
|
||||
{
|
||||
dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||
return $this->db?pg_close($this->db):0;
|
||||
if ($this->db)
|
||||
{
|
||||
//dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||
$this->connected=0;
|
||||
return pg_close($this->db);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user