]> git.mxchange.org Git - friendica.git/commitdiff
Rearranged lines
authorMichael <heluecht@pirati.ca>
Mon, 24 Apr 2017 06:26:49 +0000 (06:26 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 24 Apr 2017 06:26:49 +0000 (06:26 +0000)
include/dba.php

index ee62d309ccd2b6f4ebebb8dfb41fbb9b485b39bd..d9ab38f429648b3f72e00bc9a79a531a65eddc02 100644 (file)
@@ -467,6 +467,22 @@ class dba {
                return $id;
        }
 
+       function __destruct() {
+               if ($this->db) {
+                       switch ($this->driver) {
+                               case 'pdo':
+                                       $this->db = null;
+                                       break;
+                               case 'mysqli':
+                                       $this->db->close();
+                                       break;
+                               case 'mysql':
+                                       mysql_close($this->db);
+                                       break;
+                       }
+               }
+       }
+
        /**
         * @brief Replaces ANY_VALUE() function by MIN() function,
         *  if the database server does not support ANY_VALUE().
@@ -487,22 +503,6 @@ class dba {
                return $sql;
        }
 
-       function __destruct() {
-               if ($this->db) {
-                       switch ($this->driver) {
-                               case 'pdo':
-                                       $this->db = null;
-                                       break;
-                               case 'mysqli':
-                                       $this->db->close();
-                                       break;
-                               case 'mysql':
-                                       mysql_close($this->db);
-                                       break;
-                       }
-               }
-       }
-
        /**
         * @brief Executes a prepared statement
         *