diff options
author | zotlabs <mike@macgirvin.com> | 2018-03-02 01:01:30 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-03-02 01:03:14 -0800 |
commit | dcfe9bc64f822af02021767bf8c70fbe9d847bda (patch) | |
tree | 04e29f46f64965ab8b822745e4ed2262ab0921db /include/follow.php | |
parent | 8fd619da7178fa87352bb6f917aa569a96e323d2 (diff) | |
download | volse-hubzilla-dcfe9bc64f822af02021767bf8c70fbe9d847bda.tar.gz volse-hubzilla-dcfe9bc64f822af02021767bf8c70fbe9d847bda.tar.bz2 volse-hubzilla-dcfe9bc64f822af02021767bf8c70fbe9d847bda.zip |
background work for caldav integration continued, modify mod_follow to allow it to be called from ajax without redirecting.
Diffstat (limited to 'include/follow.php')
-rw-r--r-- | include/follow.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/include/follow.php b/include/follow.php index 0843802c5..a63fe66ea 100644 --- a/include/follow.php +++ b/include/follow.php @@ -88,9 +88,18 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false) // Premium channel, set confirm before callback to avoid recursion - if(array_key_exists('connect_url',$j) && ($interactive) && (! $confirm)) - goaway(zid($j['connect_url'])); - + if(array_key_exists('connect_url',$j) && (! $confirm)) { + if($interactive) { + goaway(zid($j['connect_url'])); + } + else { + $result['message'] = t('Premium channel - please visit:') . ' ' . zid($j['connect_url']); + logger('mod_follow: ' . $result['message']); + return $result; + } + } + + // do we have an xchan and hubloc? // If not, create them. |