diff options
author | mrjive <mrjive@mrjive.it> | 2015-04-15 11:19:25 +0200 |
---|---|---|
committer | mrjive <mrjive@mrjive.it> | 2015-04-15 11:19:25 +0200 |
commit | 7b467d6ca7a27bd83388627f16df96b47963c42f (patch) | |
tree | 76c7ba2286bb8cb3c031137f394cc3bd02b84c73 /mod/connedit.php | |
parent | 865b602cf8b4eff5e7da00362df95e52e2fe4f77 (diff) | |
parent | 834044b15bf4cd3f436f065449cbc0ed76b4de93 (diff) | |
download | volse-hubzilla-7b467d6ca7a27bd83388627f16df96b47963c42f.tar.gz volse-hubzilla-7b467d6ca7a27bd83388627f16df96b47963c42f.tar.bz2 volse-hubzilla-7b467d6ca7a27bd83388627f16df96b47963c42f.zip |
Merge pull request #1 from redmatrix/master
2015-04-15_1
Diffstat (limited to 'mod/connedit.php')
-rw-r--r-- | mod/connedit.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mod/connedit.php b/mod/connedit.php index 70839e373..8ae1707ae 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -177,7 +177,17 @@ function connedit_post(&$a) { if(($_REQUEST['pending']) && ($abook_flags & ABOOK_FLAG_PENDING)) { $abook_flags = ( $abook_flags ^ ABOOK_FLAG_PENDING ); $new_friend = true; + if(! $abook_my_perms) { + $abook_my_perms = get_channel_default_perms(local_channel()); + + $role = get_pconfig(local_channel(),'system','permissions_role'); + if($role) { + $x = get_role_perms($role); + if($x['perms_accept']) + $abook_my_perms = $x['perms_accept']; + } + } } $r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_flags = %d |