diff options
author | friendica <info@friendica.com> | 2012-12-31 01:17:52 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-12-31 01:17:52 -0800 |
commit | db16ea8527c27e9012e5683058a97f33e25eb44b (patch) | |
tree | 5b77050d3e734353c3010d5f2fe23f581fa424d0 | |
parent | ba0876d01198fa36fa48b7a14a42b0ab6d7007b6 (diff) | |
download | volse-hubzilla-db16ea8527c27e9012e5683058a97f33e25eb44b.tar.gz volse-hubzilla-db16ea8527c27e9012e5683058a97f33e25eb44b.tar.bz2 volse-hubzilla-db16ea8527c27e9012e5683058a97f33e25eb44b.zip |
connections edit: show existing permissions as checked (or unchecked) even if disabled
-rw-r--r-- | mod/connections.php | 5 |
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]); } |