aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-09-29 02:47:36 -0700
committerfriendica <info@friendica.com>2013-09-29 02:47:36 -0700
commita06f1f95944ffa578296268ecde3d77f42b69229 (patch)
tree8b6ce64cc594cb07996b5cff0a7302449effa0d0 /include
parent6ca6bc2dd8cadb509ad84e184a11a80c6441921f (diff)
downloadvolse-hubzilla-a06f1f95944ffa578296268ecde3d77f42b69229.tar.gz
volse-hubzilla-a06f1f95944ffa578296268ecde3d77f42b69229.tar.bz2
volse-hubzilla-a06f1f95944ffa578296268ecde3d77f42b69229.zip
Issue #158
Diffstat (limited to 'include')
-rwxr-xr-xinclude/items.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/items.php b/include/items.php
index 45d9d28fc..0d51946e4 100755
--- a/include/items.php
+++ b/include/items.php
@@ -3770,9 +3770,9 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
}
elseif($arr['cid'] && $uid) {
- $r = q("SELECT * from abook where abook_id = %d and abook_channel = %d and not ( abook_flags & " . intval(ABOOK_FLAG_BLOCKED) . ") limit 1",
+ $r = q("SELECT abook.*, xchan.* from abook left join xchan on abook_xchan = xchan_hash where abook_id = %d and abook_channel = %d and not ( abook_flags & " . intval(ABOOK_FLAG_BLOCKED) . ") limit 1",
intval($arr['cid']),
- intval($uid)
+ intval(local_user())
);
if($r) {
$sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval($arr['uid']) . " AND ( author_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or owner_xchan = '" . dbesc($r[0]['abook_xchan']) . "' ) and item_restrict = 0 ) ";