Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev
This commit is contained in:
commit
ce50a429fa
@ -4,20 +4,26 @@ require_once('include/dba/dba_driver.php');
|
|||||||
|
|
||||||
class dba_mysqli extends dba_driver {
|
class dba_mysqli extends dba_driver {
|
||||||
|
|
||||||
function connect($server, $port, $user,$pass,$db) {
|
function connect($server,$port,$user,$pass,$db) {
|
||||||
if($port)
|
if($port)
|
||||||
$this->db = new mysqli($server,$user,$pass,$db, $port);
|
$this->db = new mysqli($server,$user,$pass,$db, $port);
|
||||||
else
|
else
|
||||||
$this->db = new mysqli($server,$user,$pass,$db);
|
$this->db = new mysqli($server,$user,$pass,$db);
|
||||||
|
|
||||||
if(! mysqli_connect_errno()) {
|
if($this->db->connect_error) {
|
||||||
$this->connected = true;
|
$this->connected = false;
|
||||||
|
$this->error = $this->db->connect_error;
|
||||||
|
|
||||||
|
if(file_exists('dbfail.out')) {
|
||||||
|
file_put_contents('dbfail.out', datetime_convert() . "\nConnect: " . $this->error . "\n", FILE_APPEND);
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if($this->connected) {
|
else {
|
||||||
|
$this->connected = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
$this->error = $this->db->connect_error;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function q($sql) {
|
function q($sql) {
|
||||||
|
@ -1 +1 @@
|
|||||||
2016-04-25.1377H
|
2016-04-26.1378H
|
||||||
|
Reference in New Issue
Block a user