aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinclude/items.php4
-rw-r--r--mod/connections.php7
-rw-r--r--mod/network.php6
-rw-r--r--version.inc2
4 files changed, 13 insertions, 6 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 ) ";
diff --git a/mod/connections.php b/mod/connections.php
index 47c8d9c44..95fc18174 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -315,6 +315,13 @@ function connections_content(&$a) {
),
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(
'label' => (($contact['abook_flags'] & ABOOK_FLAG_BLOCKED) ? t('Unblock') : t('Block')),
'url' => $a->get_baseurl(true) . '/connections/' . $contact['abook_id'] . '/block',
'sel' => (($contact['abook_flags'] & ABOOK_FLAG_BLOCKED) ? 'active' : ''),
diff --git a/mod/network.php b/mod/network.php
index ac8c38290..72391497b 100644
--- a/mod/network.php
+++ b/mod/network.php
@@ -452,16 +452,16 @@ function network_content(&$a, $update = 0, $load = false) {
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(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 ) ";
- $o = '<h2>' . t('Contact: ') . $r[0]['name'] . '</h2>' . $o;
+ $o = '<h2>' . t('Connection: ') . $r[0]['xchan_name'] . '</h2>' . $o;
}
else {
- notice( t('Invalid contact.') . EOL);
+ notice( t('Invalid connection.') . EOL);
goaway($a->get_baseurl(true) . '/network');
}
}
diff --git a/version.inc b/version.inc
index b3826e196..a87ce0f32 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-09-28.450
+2013-09-29.451