diff options
author | Simon L'nu <simon.lnu@gmail.com> | 2012-03-19 03:41:26 -0400 |
---|---|---|
committer | Simon L'nu <simon.lnu@gmail.com> | 2012-03-19 03:41:26 -0400 |
commit | 236eaf6ed09df34e62cf487712d909cb8a3b35d1 (patch) | |
tree | 86518b59c0318d8057a1a8503c6354ebaa96dae3 /include/dba.php | |
parent | 5e2a9c99a64dc75dd70320859b093d132e823f1f (diff) | |
parent | 283bc51acf479eebd54145eb639c681980f6717b (diff) | |
download | volse-hubzilla-236eaf6ed09df34e62cf487712d909cb8a3b35d1.tar.gz volse-hubzilla-236eaf6ed09df34e62cf487712d909cb8a3b35d1.tar.bz2 volse-hubzilla-236eaf6ed09df34e62cf487712d909cb8a3b35d1.zip |
Merge branch 'master', remote-tracking branch 'remotes/upstream/master'
* remotes/upstream/master:
Existing photos could not be used as profile photos anymore - should be fixed now. And some extra logging in the CSRF-Protection to make debugging easier
community discovery cont., cleanup of DB debugging
* master:
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); } |