Fix: Status of db hanlder not modified on disconnect
This commit is contained in:
parent
c5c9432b01
commit
b6e658aaaa
@ -230,16 +230,21 @@ class DoliDb
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fermeture d'une connexion vers une database.
|
* Close database connexion
|
||||||
* \return resource
|
* @return boolean True if disconnect successfull, false otherwise
|
||||||
* \see connect
|
* @see connect
|
||||||
*/
|
*/
|
||||||
function close()
|
function close()
|
||||||
{
|
{
|
||||||
dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
if ($this->db)
|
||||||
return $this->db?mssql_close($this->db):0;
|
{
|
||||||
}
|
//dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||||
|
$this->connected=0;
|
||||||
|
return mssql_close($this->db);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -274,16 +274,21 @@ class DoliDb
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fermeture d'une connexion vers une database.
|
* Close database connexion
|
||||||
* \return resource
|
* @return boolean True if disconnect successfull, false otherwise
|
||||||
* \seealso connect
|
* @see connect
|
||||||
*/
|
*/
|
||||||
function close()
|
function close()
|
||||||
{
|
{
|
||||||
dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
if ($this->db)
|
||||||
return ($this->db?mysql_close($this->db):0);
|
{
|
||||||
}
|
//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.
|
* Close database connexion
|
||||||
* \return resource
|
* @return boolean True if disconnect successfull, false otherwise
|
||||||
* \seealso connect
|
* @see connect
|
||||||
*/
|
*/
|
||||||
function close()
|
function close()
|
||||||
{
|
{
|
||||||
dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
if ($this->db)
|
||||||
return $this->db?mysqli_close($this->db):0;
|
{
|
||||||
|
//dol_syslog("DoliDB::disconnect",LOG_DEBUG);
|
||||||
|
$this->connected=0;
|
||||||
|
return mysqli_close($this->db);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -414,15 +414,21 @@ class DoliDb
|
|||||||
return explode('.',$this->getVersion());
|
return explode('.',$this->getVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Fermeture d'une connexion vers une database.
|
* Close database connexion
|
||||||
* \return resource
|
* @return boolean True if disconnect successfull, false otherwise
|
||||||
*/
|
* @see connect
|
||||||
function close()
|
*/
|
||||||
{
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Debut d'une transaction.
|
* \brief Debut d'une transaction.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user