aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mod/connections.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/mod/connections.php b/mod/connections.php
index 3f7d65d60..e04fb6e63 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -308,8 +308,11 @@ function connections_content(&$a) {
$channel = $a->get_channel();
$global_perms = get_perms();
+ $existing = get_all_perms(local_user(),$contact);
+
+
foreach($global_perms as $k => $v) {
- $perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),(($contact['abook_my_perms'] & $v[1]) ? "1" : ""), $v[1], (($channel[$v[0]] == PERMS_SPECIFIC) ? '' : '1'), $v[4]);
+ $perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),((($contact['abook_my_perms'] & $v[1]) || $existing[$k]) ? "1" : ""), $v[1], (($channel[$v[0]] == PERMS_SPECIFIC) ? '' : '1'), $v[4]);
}