From: Michael Date: Mon, 13 Mar 2017 06:09:00 +0000 (+0000) Subject: Remove redundancies. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=acadb8ecdbb4b74b9fdc3d8d913b697f14753938;p=friendica.git Remove redundancies. --- diff --git a/include/dba.php b/include/dba.php index 7a1e3a2597..4b0498ad3c 100644 --- a/include/dba.php +++ b/include/dba.php @@ -218,21 +218,7 @@ class dba { $this->error = ''; - // Check the connection (This can reconnect the connection - if configured) - switch ($this->driver) { - case 'pdo': - // Not sure if this really is working like expected - $connected = ($this->db->getAttribute(PDO::ATTR_CONNECTION_STATUS) != ""); - break; - case 'mysqli': - $connected = $this->db->ping(); - break; - case 'mysql': - $connected = mysql_ping($this->db); - break; - } - - $connstr = ($connected ? "Connected" : "Disonnected"); + $connstr = ($this->connected() ? "Connected" : "Disonnected"); $stamp1 = microtime(true);