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 /mod/connedit.php | |
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 'mod/connedit.php')
-rw-r--r-- | mod/connedit.php | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/mod/connedit.php b/mod/connedit.php index c27f4588a..089587fc7 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -131,6 +131,7 @@ function connedit_post(&$a) { if(($_REQUEST['pending']) && ($abook_flags & ABOOK_FLAG_PENDING)) { $abook_flags = ( $abook_flags ^ ABOOK_FLAG_PENDING ); $new_friend = true; + } $r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_rating = %d, abook_rating_text = '%s', abook_flags = %d @@ -273,27 +274,19 @@ function connedit_content(&$a) { $sort_type = 0; $o = ''; - // this triggers some javascript to set Full Sharing by default after - // completing a "follow" - which can be changed to something else before - // form submission, but this gives us something useable - - if($_GET['follow'] == 1) { - $o .= '<script>var after_following = 1;</script>'; - } if(! local_user()) { notice( t('Permission denied.') . EOL); return login(); } - $my_perms = 0; + $my_perms = get_channel_default_perms(local_user()); $role = get_pconfig(local_user(),'system','permissions_role'); if($role) { $x = get_role_perms($role); if($x['perms_accept']) $my_perms = $x['perms_accept']; - else - $my_perms = get_channel_default_perms(local_user()); } + if($my_perms) { $o .= "<script>function connectDefaultShare() { \$('.abook-edit-me').each(function() { |