diff options
author | friendica <info@friendica.com> | 2015-01-25 13:30:40 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-25 13:30:40 -0800 |
commit | 4ca2ec7638664dd0514beddd982c9d7b541522eb (patch) | |
tree | 9d6ef6ce0454958a059c04119047d030cdbfcaf6 /include | |
parent | 642c933d9893f927b866038a73125247cf79cd73 (diff) | |
download | volse-hubzilla-4ca2ec7638664dd0514beddd982c9d7b541522eb.tar.gz volse-hubzilla-4ca2ec7638664dd0514beddd982c9d7b541522eb.tar.bz2 volse-hubzilla-4ca2ec7638664dd0514beddd982c9d7b541522eb.zip |
rework the new connection stuff so we don't need a "permissions have been changed but not saved" message.
Diffstat (limited to 'include')
-rw-r--r-- | include/follow.php | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/include/follow.php b/include/follow.php index 1abd0e3b9..06c0c5c62 100644 --- a/include/follow.php +++ b/include/follow.php @@ -66,14 +66,15 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $my_perms = get_channel_default_perms($uid); - if($is_red && $j) { + $role = get_pconfig($uid,'system','permissions_role'); + if($role) { + $x = get_role_perms($role); + if($x['perms_follow']) + $my_perms = $x['perms_follow']; + } - $role = get_pconfig($uid,'system','permissions_role'); - if($role) { - $x = get_role_perms($role); - if($x['perms_follow']) - $my_perms = $x['perms_follow']; - } + + if($is_red && $j) { logger('follow: ' . $url . ' ' . print_r($j,true), LOGGER_DEBUG); @@ -105,7 +106,6 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) $xchan_hash = $x['hash']; - $their_perms = 0; $global_perms = get_perms(); @@ -163,12 +163,6 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) if($r) { $xchan_hash = $r[0]['xchan_hash']; $their_perms = 0; - $role = get_pconfig($uid,'system','permissions_role'); - if($role) { - $x = get_role_perms($role); - if($x['perms_follow']) - $my_perms = $x['perms_follow']; - } } } @@ -198,6 +192,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) } if($is_http) { + if(! intval(get_config('system','feed_contacts'))) { $result['message'] = t('Protocol disabled.'); return $result; |