From db16ea8527c27e9012e5683058a97f33e25eb44b Mon Sep 17 00:00:00 2001 From: friendica Date: Mon, 31 Dec 2012 01:17:52 -0800 Subject: connections edit: show existing permissions as checked (or unchecked) even if disabled --- mod/connections.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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]); } -- cgit v1.2.3