Marius Cramer
2015-04-16 40c6e8fd1822039f57b775488aaf7de58e490adb
- fix for installer mysql lib
1 files modified
16 ■■■■■ changed files
install/lib/mysql.lib.php 16 ●●●●● patch | view | raw | blame | history
install/lib/mysql.lib.php
@@ -71,7 +71,15 @@
        $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 @@
        $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 @@
    private function _query($sQuery = '') {
        global $app;
        $this->connect();
        //if($this->isConnected == false) return false;
        if ($sQuery == '') {
            $this->_sqlerror('Keine Anfrage angegeben / No query given');