aboutsummaryrefslogtreecommitdiffstats
path: root/mod/connections.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-12-31 01:17:52 -0800
committerfriendica <info@friendica.com>2012-12-31 01:17:52 -0800
commitdb16ea8527c27e9012e5683058a97f33e25eb44b (patch)
tree5b77050d3e734353c3010d5f2fe23f581fa424d0 /mod/connections.php
parentba0876d01198fa36fa48b7a14a42b0ab6d7007b6 (diff)
downloadvolse-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
Diffstat (limited to 'mod/connections.php')
-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]);
}