]> git.mxchange.org Git - friendica.git/commitdiff
Remove redundancies.
authorMichael <heluecht@pirati.ca>
Mon, 13 Mar 2017 06:09:00 +0000 (06:09 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 13 Mar 2017 06:09:00 +0000 (06:09 +0000)
include/dba.php

index 7a1e3a25975ade6f09cd7dfa5f2675635aed7db7..4b0498ad3cb5cd0b469c20d22d7de0ba4da87b53 100644 (file)
@@ -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);