aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-22 19:08:59 -0700
committerredmatrix <git@macgirvin.com>2016-06-22 19:08:59 -0700
commit1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d (patch)
tree4a17682af3080965581acf46b32becbab29ea2ce
parentec8091a102b9cb2f8f47ef87982533bcd5ba9886 (diff)
downloadvolse-hubzilla-1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d.tar.gz
volse-hubzilla-1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d.tar.bz2
volse-hubzilla-1267d995ef031f6ecf4d1f1951a700dfdcbf6c8d.zip
db statement debugging
-rw-r--r--Zotlabs/Module/Photo.php4
-rw-r--r--Zotlabs/Module/Profile_photo.php5
-rwxr-xr-xinclude/dba/dba_driver.php5
3 files changed, 8 insertions, 6 deletions
diff --git a/Zotlabs/Module/Photo.php b/Zotlabs/Module/Photo.php
index 92c9ac3c0..5148c4a94 100644
--- a/Zotlabs/Module/Photo.php
+++ b/Zotlabs/Module/Photo.php
@@ -62,7 +62,7 @@ class Photo extends \Zotlabs\Web\Controller {
intval($uid),
intval(PHOTO_PROFILE)
);
- if(count($r)) {
+ if($r) {
$data = dbunescbin($r[0]['content']);
$mimetype = $r[0]['mimetype'];
}
@@ -79,7 +79,7 @@ class Photo extends \Zotlabs\Web\Controller {
* Other photos
*/
- /* Check for a cookie to indicate display pixel density, in order to detect high-resolution
+ /* Check for a cookie to indicate display pixel density, in order to detect high-resolution
displays. This procedure was derived from the "Retina Images" by Jeremey Worboys,
used in accordance with the Creative Commons Attribution 3.0 Unported License.
Project link: https://github.com/Retina-Images/Retina-Images
diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php
index 6129a7492..9480a2f7f 100644
--- a/Zotlabs/Module/Profile_photo.php
+++ b/Zotlabs/Module/Profile_photo.php
@@ -23,12 +23,11 @@ class Profile_photo extends \Zotlabs\Web\Controller {
/* @brief Initalize the profile-photo edit view
*
- * @param $a Current application
* @return void
*
*/
- function init() {
+ function init() {
if(! local_channel()) {
return;
@@ -46,7 +45,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
*
*/
- function post() {
+ function post() {
if(! local_channel()) {
return;
diff --git a/include/dba/dba_driver.php b/include/dba/dba_driver.php
index df072ed76..f6091f6e1 100755
--- a/include/dba/dba_driver.php
+++ b/include/dba/dba_driver.php
@@ -90,7 +90,7 @@ abstract class dba_driver {
protected $db;
protected $pdo = array();
- public $debug = 0;
+ public $debug = 0;
public $connected = false;
public $error = false;
@@ -332,6 +332,9 @@ function q($sql) {
else
db_logger('dba: vsprintf error: ' . print_r(debug_backtrace(), true),LOGGER_NORMAL,LOG_CRIT);
}
+ if(\DBA::$dba->debug)
+ db_logger('Sql: ' . $stmt, LOGGER_DEBUG, LOG_INFO);
+
return \DBA::$dba->q($stmt);
}