summaryrefslogtreecommitdiffstats
path: root/lib/Service/FeedServiceV2.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/FeedServiceV2.php')
-rw-r--r--lib/Service/FeedServiceV2.php24
1 files changed, 10 insertions, 14 deletions
diff --git a/lib/Service/FeedServiceV2.php b/lib/Service/FeedServiceV2.php
index 6b354dc1b..4dddc9408 100644
--- a/lib/Service/FeedServiceV2.php
+++ b/lib/Service/FeedServiceV2.php
@@ -204,21 +204,17 @@ class FeedServiceV2 extends Service
list($feed, $items) = $this->feedFetcher->fetch($feedUrl, $full_text, $user, $password);
} catch (ReadErrorException $ex) {
$this->logger->debug($ex->getMessage());
- # the url did not lead to a valid feed, try autodiscover
if ($full_discover === false) {
-throw new ServiceNotFoundException($ex->getMessage());
-}
- $this->logger->warning("No valid feed found at URL, attempting auto discovery");
- $feeds = $this->explorer->discover($feedUrl);
- if ($feeds !== []) {
- $feedUrl = array_shift($feeds);
- }
- try {
- list($feed, $items) = $this->feedFetcher->fetch($feedUrl, $full_text, $user, $password);
- } catch (ReadErrorException $ex) {
- throw new ServiceNotFoundException($ex->getMessage());
- }
- } else {
+ throw new ServiceNotFoundException($ex->getMessage());
+ }
+ $this->logger->warning("No valid feed found at URL, attempting auto discovery");
+ $feeds = $this->explorer->discover($feedUrl);
+ if ($feeds !== []) {
+ $feedUrl = array_shift($feeds);
+ }
+ try {
+ list($feed, $items) = $this->feedFetcher->fetch($feedUrl, $full_text, $user, $password);
+ } catch (ReadErrorException $ex) {
throw new ServiceNotFoundException($ex->getMessage());
}
}