Commit 98391cae authored by Dave Lane's avatar Dave Lane
Browse files

fixed minor regression where '?' was added to end of feed URL

parent 5bc32ce6
...@@ -101,7 +101,8 @@ abstract class BFFFinder extends BFFFeed { ...@@ -101,7 +101,8 @@ abstract class BFFFinder extends BFFFeed {
if (array_key_exists($this->response['content_type'], $this->feed_types)) { if (array_key_exists($this->response['content_type'], $this->feed_types)) {
$content_type = $this->feed_types[$this->response['content_type']]; $content_type = $this->feed_types[$this->response['content_type']];
$this->log('***** bingo! We\'ve got a valid feed type '.$content_type); $this->log('***** bingo! We\'ve got a valid feed type '.$content_type);
$this->add_message('Yay! we found a valid feed!', 'The address '.$url.' points to a valid "'.$content_type.'" feed!', 'good'); $this->add_message('Yay! we found a valid feed!', 'The address '.$url.
' points to a valid "'.$content_type.'" feed!', 'good');
$this->add_feed($url, $this->response['content_type']); $this->add_feed($url, $this->response['content_type']);
return true; return true;
} else { } else {
...@@ -129,8 +130,11 @@ abstract class BFFFinder extends BFFFeed { ...@@ -129,8 +130,11 @@ abstract class BFFFinder extends BFFFeed {
$feed_parts = parse_url($feed); $feed_parts = parse_url($feed);
if ($url_parts['scheme'] == 'https' && $feed_parts['scheme'] == 'http') { if ($url_parts['scheme'] == 'https' && $feed_parts['scheme'] == 'http') {
$this->log('Uh oh!!! Feed URL uses http, but main URL accepts https!'); $this->log('Uh oh!!! Feed URL uses http, but main URL accepts https!');
$feed = 'https://'.$feed_parts['host'].$feed_parts['path']. $feed = 'https://'.$feed_parts['host'].$feed_parts['path'];
'?'.$feed_parts['query']; if (isset($feed_parts['query'])) {
$this->log('query = '.$feed_parts['query']);
$feed .= '?'.$feed_parts['query'];
}
$this->log('new feed url = '.$feed); $this->log('new feed url = '.$feed);
} }
$type = $link->getAttribute('type'); $type = $link->getAttribute('type');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment