From 6fba7ac1aff92e327357d21b00e8919e041d8395 Mon Sep 17 00:00:00 2001 From: friendica Date: Thu, 27 Jun 2013 21:40:56 -0700 Subject: fix cid query --- include/items.php | 2 +- mod/network.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/items.php b/include/items.php index 2e54b8707..c4d2a86af 100755 --- a/include/items.php +++ b/include/items.php @@ -4744,7 +4744,7 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C intval($uid) ); 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 ) "; + $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 ) "; } else { $result['message'] = t('Connection not found.'); diff --git a/mod/network.php b/mod/network.php index bbd9f9de7..aa134eece 100644 --- a/mod/network.php +++ b/mod/network.php @@ -465,7 +465,7 @@ function network_content(&$a, $update = 0, $load = false) { intval(local_user()) ); if($r) { - $sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval(local_user()) . " AND ( author_xchan = " . dbesc($r[0]['abook_xchan']) . " or owner_xchan = " . dbesc($r[0]['abook_xchan']) . " ) and item_restrict = 0 ) "; + $sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND uid = " . intval(local_user()) . " AND ( author_xchan = '" . dbesc($r[0]['abook_xchan']) . "' or owner_xchan = '" . dbesc($r[0]['abook_xchan']) . "' ) and item_restrict = 0 ) "; $o = '

' . t('Contact: ') . $r[0]['name'] . '

' . $o; } else { -- cgit v1.2.3