aboutsummaryrefslogtreecommitdiffstats
path: root/include/follow.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-08-24 17:05:18 +0100
committerThomas Willingham <founder@kakste.com>2013-08-24 17:05:18 +0100
commitc803fb90df3bbbd8bb88df09a271b5a9214e8c1d (patch)
tree0ad021580411798fc0ab025f1b1c302fe8afd3f6 /include/follow.php
parent6999fb586ba90e9f1c79e9f09f4035f63fb925fd (diff)
parentb0dd38b30949f907265eda757bfa14aa1f38b38f (diff)
downloadvolse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.tar.gz
volse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.tar.bz2
volse-hubzilla-c803fb90df3bbbd8bb88df09a271b5a9214e8c1d.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/follow.php')
-rw-r--r--include/follow.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/include/follow.php b/include/follow.php
index 6b192234c..10bcddf2b 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -11,7 +11,7 @@
require_once('include/zot.php');
-function new_contact($uid,$url,$channel,$interactive = false) {
+function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) {
$result = array('success' => false,'message' => '');
@@ -60,6 +60,11 @@ function new_contact($uid,$url,$channel,$interactive = false) {
return $result;
}
+ // Premium channel, set confirm before callback to avoid recursion
+
+ if(array_key_exists('connect_url',$j) && (! $confirm))
+ goaway(zid($j['connect_url']));
+
// check service class limits
@@ -145,12 +150,13 @@ function new_contact($uid,$url,$channel,$interactive = false) {
);
}
else {
- $r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_their_perms, abook_created, abook_updated )
- values( %d, %d, '%s', %d, '%s', '%s' ) ",
+ $r = q("insert into abook ( abook_account, abook_channel, abook_xchan, abook_their_perms, abook_my_perms, abook_created, abook_updated )
+ values( %d, %d, '%s', %d, %d, '%s', '%s' ) ",
intval($aid),
intval($uid),
dbesc($xchan_hash),
intval($their_perms),
+ intval(PERMS_W_STREAM|PERMS_W_MAIL),
dbesc(datetime_convert()),
dbesc(datetime_convert())
);