diff options
author | Thomas Willingham <beardyunixer@beardyunixer.com> | 2014-09-09 21:32:25 +0100 |
---|---|---|
committer | Thomas Willingham <beardyunixer@beardyunixer.com> | 2014-09-09 21:32:25 +0100 |
commit | ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687 (patch) | |
tree | cf1aa37d881f2ce3cb844bbcd5c11c5999e96c66 /include/follow.php | |
parent | 652ec8c3fcc956c1a5fc2adb7410e4c4a2ac6f90 (diff) | |
parent | 409c89d629993b59eaafa8443ae9d0b5f0344c1f (diff) | |
download | volse-hubzilla-ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687.tar.gz volse-hubzilla-ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687.tar.bz2 volse-hubzilla-ec4f30c3f672bbfc57bee8db0aaa0cf002fe8687.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'include/follow.php')
-rw-r--r-- | include/follow.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/follow.php b/include/follow.php index d1c6afbee..18a9e66ea 100644 --- a/include/follow.php +++ b/include/follow.php @@ -51,7 +51,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) if($arr['channel']['success']) $ret = $arr['channel']; - elseif($is_http) + elseif(! $is_http) $ret = zot_finger($url,$channel); if($ret && $ret['success']) { @@ -118,6 +118,12 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) } } else { + if(! ($is_http)) { + if(! intval(get_config('system','diaspora_enabled'))) { + $result['message'] = t('Protocol disabled.'); + return $result; + } + } $my_perms = 0; $their_perms = 0; @@ -181,7 +187,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) return $result; } - $r = q("select count(*) as total from abook where abook_account = %d and abook_network = 'rss'", + $r = q("select count(*) as total from abook where abook_account = %d and ( abook_flags & ABOOK_FLAG_FEED )", intval($aid) ); if($r) @@ -215,7 +221,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) intval($uid), dbesc($xchan_hash), intval(($is_http) ? ABOOK_FLAG_FEED : 0), - intval($their_perms), + intval(($is_http) ? $their_perms|PERMS_R_STREAM|PERMS_A_REPUBLISH : $their_perms), intval($my_perms), dbesc(datetime_convert()), dbesc(datetime_convert()) |