diff options
author | friendica <info@friendica.com> | 2014-09-02 17:21:12 -0700 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-09-02 17:21:12 -0700 |
commit | 2c94d59cba0b3231b0dd822fc1b95bed5521c48d (patch) | |
tree | 5000d4070a1810c1c4b538bf0970d867f0bb6ddb /include/network.php | |
parent | 17c1ddb77e153b72fd70d3b58befb9e791ca04c7 (diff) | |
download | volse-hubzilla-2c94d59cba0b3231b0dd822fc1b95bed5521c48d.tar.gz volse-hubzilla-2c94d59cba0b3231b0dd822fc1b95bed5521c48d.tar.bz2 volse-hubzilla-2c94d59cba0b3231b0dd822fc1b95bed5521c48d.zip |
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!)
Diffstat (limited to 'include/network.php')
-rw-r--r-- | include/network.php | 12 |
1 files changed, 7 insertions, 5 deletions
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()); |