aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-08-12 00:59:05 -0700
committerzotlabs <mike@macgirvin.com>2017-08-12 00:59:05 -0700
commit998bd585bb75daf8b70071f21c5245bf24d46aa1 (patch)
tree9de4538df8163a80ad7dda23b45852a6fed2bb82
parent86c4743ed9e76f8a813f6aa8075eb68e155d85dd (diff)
downloadvolse-hubzilla-998bd585bb75daf8b70071f21c5245bf24d46aa1.tar.gz
volse-hubzilla-998bd585bb75daf8b70071f21c5245bf24d46aa1.tar.bz2
volse-hubzilla-998bd585bb75daf8b70071f21c5245bf24d46aa1.zip
add protocol selection to following feeds
-rw-r--r--include/follow.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/follow.php b/include/follow.php
index 130f8b06b..56d8294c5 100644
--- a/include/follow.php
+++ b/include/follow.php
@@ -138,6 +138,7 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
);
if(! $r) {
+
// attempt network auto-discovery
$d = discover_by_webbie($url,$protocol);
@@ -146,11 +147,13 @@ function new_contact($uid,$url,$channel,$interactive = false, $confirm = false)
// try RSS discovery
- if(get_config('system','feed_contacts')) {
+ $feeds = get_config('system','feed_contacts');
+
+ if(($feeds) && ($protocol === '' || $protocol === 'feed')) {
$d = discover_by_url($url);
}
else {
- $result['message'] = t('Protocol disabled.');
+ $result['message'] = t('Remote channel or protocol unavailable.');
return $result;
}
}