aboutsummaryrefslogtreecommitdiffstats
path: root/mod/connedit.php
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-09-18 18:07:38 +0100
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-09-18 18:07:38 +0100
commitbdfe2c77868afd59716103091b0dfa05060252d5 (patch)
tree83bb1d5522e2c12ea778c84879f269ab56d712c0 /mod/connedit.php
parent68ecc673b109be50dc04cf72af8ce2296c70b86b (diff)
parent595be9919b0ce85087937985444477189381976c (diff)
downloadvolse-hubzilla-bdfe2c77868afd59716103091b0dfa05060252d5.tar.gz
volse-hubzilla-bdfe2c77868afd59716103091b0dfa05060252d5.tar.bz2
volse-hubzilla-bdfe2c77868afd59716103091b0dfa05060252d5.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/connedit.php')
-rw-r--r--mod/connedit.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/mod/connedit.php b/mod/connedit.php
index b2de42343..7ad719738 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -255,6 +255,28 @@ function connedit_content(&$a) {
return login();
}
+ $my_perms = 0;
+ $role = get_pconfig(local_user(),'system','permissions_role');
+ if($role) {
+ $x = get_role_perms($role);
+ if($x['perms_accept'])
+ $my_perms = $x['perms_accept'];
+ }
+ if($my_perms) {
+ $o .= "<script>function connectDefaultShare() {
+ \$('.abook-edit-me').each(function() {
+ if(! $(this).is(':disabled'))
+ $(this).removeAttr('checked');
+ });\n\n";
+ $perms = get_perms();
+ foreach($perms as $p => $v) {
+ if($my_perms & $v[1]) {
+ $o .= "\$('#me_id_perms_" . $p . "').attr('checked','checked'); \n";
+ }
+ }
+ $o .= "abook_perms_msg(); }\n</script>\n";
+ }
+
if(argc() == 3) {
$contact_id = intval(argv(1));