diff options
author | friendica <info@friendica.com> | 2012-03-18 22:12:36 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-03-18 22:12:36 -0700 |
commit | cca524495cdc8c1167421393f4d8e8da4a94a855 (patch) | |
tree | 2e76b0ce5b6baf26ff6ba2e8ee89efde74080b5e /include/dba.php | |
parent | 02786d6ed0811b0d63c0e466309dfda7740e2609 (diff) | |
download | volse-hubzilla-cca524495cdc8c1167421393f4d8e8da4a94a855.tar.gz volse-hubzilla-cca524495cdc8c1167421393f4d8e8da4a94a855.tar.bz2 volse-hubzilla-cca524495cdc8c1167421393f4d8e8da4a94a855.zip |
community discovery cont., cleanup of DB debugging
Diffstat (limited to 'include/dba.php')
-rwxr-xr-x | include/dba.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/include/dba.php b/include/dba.php index 7455b6b3e..5beea7a3a 100755 --- a/include/dba.php +++ b/include/dba.php @@ -1,5 +1,7 @@ <?php +require_once('include/datetime.php'); + /** * * MySQL database class @@ -104,19 +106,17 @@ class dba { logger('dba: ' . $str ); } - else { - /** - * If dbfail.out exists, we will write any failed calls directly to it, - * regardless of any logging that may or may nor be in effect. - * These usually indicate SQL syntax errors that need to be resolved. - */ + /** + * If dbfail.out exists, we will write any failed calls directly to it, + * regardless of any logging that may or may nor be in effect. + * These usually indicate SQL syntax errors that need to be resolved. + */ - if($result === false) { - logger('dba: ' . printable($sql) . ' returned false.'); - if(file_exists('dbfail.out')) - file_put_contents('dbfail.out', printable($sql) . ' returned false' . "\n", FILE_APPEND); - } + if($result === false) { + logger('dba: ' . printable($sql) . ' returned false.'); + if(file_exists('dbfail.out')) + file_put_contents('dbfail.out', datetime_convert() . "\n" . printable($sql) . ' returned false' . "\n", FILE_APPEND); } if(($result === true) || ($result === false)) @@ -140,7 +140,7 @@ class dba { if($this->debug) - logger('dba: ' . printable(print_r($r, true)), LOGGER_DATA); + logger('dba: ' . printable(print_r($r, true))); return($r); } |