From 2c94d59cba0b3231b0dd822fc1b95bed5521c48d Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 2 Sep 2014 17:21:12 -0700 Subject: use feed title for channel name before checking author, make feed items shareable (they're private to the channel so they won't be shown in searches), try and handle Diaspora mentions a bit more elegantly. (Bug: we don't convert mentions to Diaspora's format on outbound at all!) --- include/network.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'include/network.php') diff --git a/include/network.php b/include/network.php index c44ed77c4..77c1550ba 100644 --- a/include/network.php +++ b/include/network.php @@ -868,15 +868,18 @@ function discover_by_url($url,$arr = null) { if($feed->error()) logger('probe_url: scrape_feed: Error parsing XML: ' . $feed->error()); + $name = unxmlify(trim($feed->get_title())); $photo = $feed->get_image_url(); $author = $feed->get_author(); if($author) { - $name = unxmlify(trim($author->get_name())); if(! $name) + $name = unxmlify(trim($author->get_name())); + if(! $name) { $name = trim(unxmlify($author->get_email())); - if(strpos($name,'@') !== false) - $name = substr($name,0,strpos($name,'@')); + if(strpos($name,'@') !== false) + $name = substr($name,0,strpos($name,'@')); + } if(! $profile && $author->get_link()) $profile = trim(unxmlify($author->get_link())); if(! $photo) { @@ -924,8 +927,7 @@ function discover_by_url($url,$arr = null) { if(! $network) { $network = 'rss'; } - if(! $name) - $name = notags($feed->get_title()); + if(! $name) $name = notags($feed->get_description()); -- cgit v1.2.3