diff options
| author | 2014-12-12 18:58:34 +0100 | |
|---|---|---|
| committer | 2014-12-12 18:58:34 +0100 | |
| commit | eabcf90f5266b746503fef5c438971d7d6a1689e (patch) | |
| tree | 7f2d6d38d297a0f4c4b4e7d52e0d59ce7f7f025b /app/Models/Feed.php | |
| parent | 99763412c2f49e4e52b5a0343bb465141be76188 (diff) | |
| parent | 6078888de631ea105410079888838503fd7acb3d (diff) | |
Merge branch 'dev' into beta
Conflicts:
app/i18n/en.php
app/i18n/fr.php
Diffstat (limited to 'app/Models/Feed.php')
| -rw-r--r-- | app/Models/Feed.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index bd1babeea..8f4b60097 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -210,6 +210,10 @@ class FreshRSS_Feed extends Minz_Model { $url = preg_replace('#((.+)://)(.+)#', '${1}' . $this->httpAuth . '@${3}', $url); } $feed = customSimplePie(); + if (substr($url, -11) === '#force_feed') { + $feed->force_feed(true); + $url = substr($url, 0, -11); + } $feed->set_feed_url($url); if (!$loadDetails) { //Only activates auto-discovery when adding a new feed $feed->set_autodiscovery_level(SIMPLEPIE_LOCATOR_NONE); @@ -226,7 +230,7 @@ class FreshRSS_Feed extends Minz_Model { $subscribe_url = $feed->subscribe_url(false); $title = strtr(html_only_entity_decode($feed->get_title()), array('<' => '<', '>' => '>', '"' => '"')); //HTML to HTML-PRE //ENT_COMPAT except & - $this->_name($title == '' ? $this->url : $title); + $this->_name($title == '' ? $url : $title); $this->_website(html_only_entity_decode($feed->get_link())); $this->_description(html_only_entity_decode($feed->get_description())); @@ -235,7 +239,7 @@ class FreshRSS_Feed extends Minz_Model { $subscribe_url = $feed->subscribe_url(true); } - if ($subscribe_url !== null && $subscribe_url !== $this->url) { + if ($subscribe_url !== null && $subscribe_url !== $url) { if ($this->httpAuth != '') { // on enlève les id si authentification HTTP $subscribe_url = preg_replace('#((.+)://)((.+)@)(.+)#', '${1}${5}', $subscribe_url); |
