Issue #158
This commit is contained in:
parent
6ca6bc2dd8
commit
a06f1f9594
@ -3770,9 +3770,9 @@ function items_fetch($arr,$channel = null,$observer_hash = null,$client_mode = C
|
|||||||
}
|
}
|
||||||
elseif($arr['cid'] && $uid) {
|
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($arr['cid']),
|
||||||
intval($uid)
|
intval(local_user())
|
||||||
);
|
);
|
||||||
if($r) {
|
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 ) ";
|
||||||
|
@ -314,6 +314,13 @@ function connections_content(&$a) {
|
|||||||
'title' => t('Fetch updated permissions'),
|
'title' => t('Fetch updated permissions'),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
array(
|
||||||
|
'label' => t('Recent Activity'),
|
||||||
|
'url' => $a->get_baseurl(true) . '/network/?f=&cid=' . $contact['abook_id'],
|
||||||
|
'sel' => '',
|
||||||
|
'title' => t('View recent posts and comments'),
|
||||||
|
),
|
||||||
|
|
||||||
array(
|
array(
|
||||||
'label' => (($contact['abook_flags'] & ABOOK_FLAG_BLOCKED) ? t('Unblock') : t('Block')),
|
'label' => (($contact['abook_flags'] & ABOOK_FLAG_BLOCKED) ? t('Unblock') : t('Block')),
|
||||||
'url' => $a->get_baseurl(true) . '/connections/' . $contact['abook_id'] . '/block',
|
'url' => $a->get_baseurl(true) . '/connections/' . $contact['abook_id'] . '/block',
|
||||||
|
@ -452,16 +452,16 @@ function network_content(&$a, $update = 0, $load = false) {
|
|||||||
|
|
||||||
elseif($cid) {
|
elseif($cid) {
|
||||||
|
|
||||||
$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($cid),
|
intval($cid),
|
||||||
intval(local_user())
|
intval(local_user())
|
||||||
);
|
);
|
||||||
if($r) {
|
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 = '<h2>' . t('Contact: ') . $r[0]['name'] . '</h2>' . $o;
|
$o = '<h2>' . t('Connection: ') . $r[0]['xchan_name'] . '</h2>' . $o;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
notice( t('Invalid contact.') . EOL);
|
notice( t('Invalid connection.') . EOL);
|
||||||
goaway($a->get_baseurl(true) . '/network');
|
goaway($a->get_baseurl(true) . '/network');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
2013-09-28.450
|
2013-09-29.451
|
||||||
|
Reference in New Issue
Block a user