aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <redmatrix@redmatrix.me>2015-04-14 16:22:33 -0700
committerfriendica <redmatrix@redmatrix.me>2015-04-14 16:22:33 -0700
commit3a45206b9971ee981ea61de31c8413350ebcdd7b (patch)
treef1770eb48ed8409f2ba9f7e76e2e5fe3eb8a29fa /mod
parent584e9233d4a95e3f8cbc33eaedcc59d3210a66b9 (diff)
downloadvolse-hubzilla-3a45206b9971ee981ea61de31c8413350ebcdd7b.tar.gz
volse-hubzilla-3a45206b9971ee981ea61de31c8413350ebcdd7b.tar.bz2
volse-hubzilla-3a45206b9971ee981ea61de31c8413350ebcdd7b.zip
default perms not being set in some cases
Diffstat (limited to 'mod')
-rw-r--r--mod/connedit.php10
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