aboutsummaryrefslogtreecommitdiffstats
path: root/include/dba.php
diff options
context:
space:
mode:
authorMichael Vogel <icarus@dabo.de>2012-05-26 15:41:23 +0200
committerMichael Vogel <icarus@dabo.de>2012-05-26 15:41:23 +0200
commit7f19d39b146844fd71d148690d3e550df9d3043b (patch)
treecbf1a8e13276589a4952a766ebd7311121477d28 /include/dba.php
parenta5dc41ab131d4235eb947ff00d7af0593bf0e460 (diff)
downloadvolse-hubzilla-7f19d39b146844fd71d148690d3e550df9d3043b.tar.gz
volse-hubzilla-7f19d39b146844fd71d148690d3e550df9d3043b.tar.bz2
volse-hubzilla-7f19d39b146844fd71d148690d3e550df9d3043b.zip
Doing negative caching for config values, special logfile for database optmisations
Diffstat (limited to 'include/dba.php')
-rw-r--r--include/dba.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/dba.php b/include/dba.php
index 7ecce7270..20c08c2dd 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -77,14 +77,16 @@ class dba {
$this->error = '';
- //@file_put_contents("/tmp/friendica-db.log", datetime_convert().':'.session_id(). ' Start '.$sql."\n", FILE_APPEND);
+ if (get_config("system", "db_log") != "")
+ @file_put_contents(get_config("system", "db_log"), datetime_convert().':'.session_id(). ' Start '.$sql."\n", FILE_APPEND);
if($this->mysqli)
$result = @$this->db->query($sql);
else
$result = @mysql_query($sql,$this->db);
- //@file_put_contents("/tmp/friendica-db.log", datetime_convert().':'.session_id(). ' Stop '."\n", FILE_APPEND);
+ if (get_config("system", "db_log") != "")
+ @file_put_contents(get_config("system", "db_log"), datetime_convert().':'.session_id(). ' Stop '."\n", FILE_APPEND);
if($this->mysqli) {
if($this->db->errno)