aboutsummaryrefslogtreecommitdiffstats
path: root/mod/follow.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/follow.php')
-rw-r--r--mod/follow.php23
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