aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/channel.php2
-rwxr-xr-xinclude/dba/dba_driver.php5
-rw-r--r--include/text.php8
-rw-r--r--include/widgets.php2
4 files changed, 10 insertions, 7 deletions
diff --git a/include/channel.php b/include/channel.php
index 562aedddc..a0424ee39 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -862,7 +862,7 @@ function profile_load(&$a, $nickname, $profile = '') {
);
if($z) {
$p[0]['picdate'] = $z[0]['xchan_photo_date'];
- $p[0]['reddress'] = str_replace('@','@',$z[0]['xchan_addr']);
+ $p[0]['reddress'] = str_replace('@','@',$z[0]['xchan_addr']);
}
// fetch user tags if this isn't the default profile
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);
}
diff --git a/include/text.php b/include/text.php
index 4f28c6dbc..12b6b1137 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2089,9 +2089,9 @@ function xchan_query(&$items,$abook = true,$effective_uid = 0) {
}
foreach($items as $item) {
- if($item['owner_xchan'] && (! in_array($item['owner_xchan'],$arr)))
+ if($item['owner_xchan'] && (! in_array("'" . dbesc($item['owner_xchan']) . "'",$arr)))
$arr[] = "'" . dbesc($item['owner_xchan']) . "'";
- if($item['author_xchan'] && (! in_array($item['author_xchan'],$arr)))
+ if($item['author_xchan'] && (! in_array("'" . dbesc($item['author_xchan']) . "'",$arr)))
$arr[] = "'" . dbesc($item['author_xchan']) . "'";
}
}
@@ -2124,9 +2124,9 @@ function xchan_mail_query(&$item) {
$arr = array();
$chans = null;
if($item) {
- if($item['from_xchan'] && (! in_array($item['from_xchan'],$arr)))
+ if($item['from_xchan'] && (! in_array("'" . dbesc($item['from_xchan']) . "'",$arr)))
$arr[] = "'" . dbesc($item['from_xchan']) . "'";
- if($item['to_xchan'] && (! in_array($item['to_xchan'],$arr)))
+ if($item['to_xchan'] && (! in_array("'" . dbesc($item['to_xchan']) . "'",$arr)))
$arr[] = "'" . dbesc($item['to_xchan']) . "'";
}
diff --git a/include/widgets.php b/include/widgets.php
index cdd5d72ab..8a7f4b69f 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -1158,7 +1158,7 @@ function widget_cover_photo($arr) {
if(array_key_exists('subtitle', $arr) && isset($arr['subtitle']))
$subtitle = $arr['subtitle'];
else
- $subtitle = $channel['xchan_addr'];
+ $subtitle = str_replace('@','@',$channel['xchan_addr']);
$c = get_cover_photo($channel_id,'html');