diff options
author | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2014-06-24 19:34:36 +0200 |
---|---|---|
committer | Haakon Meland Eriksen <haakon.eriksen@far.no> | 2014-06-24 19:34:36 +0200 |
commit | b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70 (patch) | |
tree | 718df6305bcb82c8dcb4b287a7132422e748cdfb /mod/follow.php | |
parent | c2d520f1be115fb3cb5da2a35eb10146cecee8aa (diff) | |
parent | a92fb0b04c3e6474ec48faf8e4cc65c382e89d66 (diff) | |
download | volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.gz volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.tar.bz2 volse-hubzilla-b8dc9e855af2d30f33d0f90dc13d8cad0a7b3e70.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/follow.php')
-rw-r--r-- | mod/follow.php | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/mod/follow.php b/mod/follow.php index fd2f8af19..663fb7536 100644 --- a/mod/follow.php +++ b/mod/follow.php @@ -6,24 +6,37 @@ require_once('include/follow.php'); function follow_init(&$a) { if(! local_user()) { - notice( t('Permission denied.') . EOL); return; } $uid = local_user(); $url = notags(trim($_REQUEST['url'])); $return_url = $_SESSION['return_url']; + $confirm = intval($_REQUEST['confirm']); - $result = new_contact($uid,$url,$a->get_channel(),true); - + $result = new_contact($uid,$url,$a->get_channel(),true,$confirm); + if($result['success'] == false) { if($result['message']) notice($result['message']); goaway($return_url); } - info( t('Channel added') . EOL); + info( t('Channel added.') . EOL); + + // If we can view their stream, pull in some posts + + if($result['abook']['abook_their_perms'] & PERMS_R_STREAM) + proc_run('php','include/onepoll.php',$result['abook']['abook_id']); + - goaway(z_root() . '/connection/' . $result['abook']['abook_id']); + goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1'); } + +function follow_content(&$a) { + + if(! local_user()) { + return login(); + } +}
\ No newline at end of file |