]> git.mxchange.org Git - friendica.git/blobdiff - include/dba.php
Merge pull request #2744 from tobiasd/20160820-cal
[friendica.git] / include / dba.php
index 3a16c187c7ec81b47085d894d169c047e18b7cd6..b0927265be9006e24bc16e368b86763ae690bb23 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+require_once("dbm.php");
 
 # if PDO is avaible for mysql, use the new database abstraction
 # TODO: PDO is disabled for release 3.3. We need to investigate why
@@ -106,6 +107,9 @@ class dba {
 
                $a->save_timestamp($stamp1, "database");
 
+               if (strtolower(substr($sql, 0, 6)) != "select")
+                       $a->save_timestamp($stamp1, "database_write");
+
                if(x($a->config,'system') && x($a->config['system'],'db_log')) {
                        if (($duration > $a->config["system"]["db_loglimit"])) {
                                $duration = round($duration, 3);
@@ -230,16 +234,6 @@ class dba {
                }
        }
 
-       /**
-        * Checks if $array is a filled array with at least one entry.
-        *
-        * @param       $array  mixed   A filled array with at least one entry
-        * @return      Whether $array is a filled array
-        */
-       public function is_result ($array) {
-               return (is_array($array) && count($array) > 0);
-       }
-
        function __destruct() {
                if ($this->db)
                        if($this->mysqli)