Commit 40c6e8fd authored by Marius Cramer's avatar Marius Cramer

- fix for installer mysql lib

parent ca2165e4
......@@ -71,7 +71,15 @@ class db extends mysqli
$this->dbCharset = $conf["mysql"]["charset"];
$this->dbNewLink = false;
$this->dbClientFlags = null;
}
public function __destruct() {
if($this->_iConnId) mysqli_close($this->_iConnId);
}
private function connect() {
if($this->_iConnId) return true;
$this->_iConnId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass);
$try = 0;
while((!is_object($this->_iConnId) || mysqli_connect_error()) && $try < 5) {
......@@ -94,11 +102,7 @@ class db extends mysqli
$this->_setCharset();
}
public function __destruct() {
if($this->_iConnId) mysqli_close($this->_iConnId);
}
public function close() {
if($this->_iConnId) mysqli_close($this->_iConnId);
$this->_iConnId = null;
......@@ -176,6 +180,8 @@ class db extends mysqli
private function _query($sQuery = '') {
global $app;
$this->connect();
//if($this->isConnected == false) return false;
if ($sQuery == '') {
$this->_sqlerror('Keine Anfrage angegeben / No query given');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment