From 7ed353ded8edd5255e2e792c89d6307dcb978623 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 11 Apr 2016 20:09:59 +0200 Subject: fix #969 --- CHANGELOG.md | 3 +++ fetcher/feedfetcher.php | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e35f32cf..6dca37189 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +owncloud-news (8.3.1) +* **Bugfix**: Use the feed url when showing an example of a curl command if a feed does not exist, #969 + owncloud-news (8.3.0) * **Bugfix**: If two folders with the same name occur in a OPML file, merge them instead of simply ignoring the second one, #962 * **Enhancement**: Better error messages for SSL issues, #966 diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php index bcb03a594..a85a17c71 100644 --- a/fetcher/feedfetcher.php +++ b/fetcher/feedfetcher.php @@ -124,13 +124,13 @@ class FeedFetcher implements IFeedFetcher { return [$feed, $items]; } catch (Exception $ex) { - $this->handleError($ex); + $this->handleError($ex, $url); } } - private function handleError(Exception $ex) { + private function handleError(Exception $ex, $url) { $msg = $ex->getMessage(); if ($ex instanceof MalFormedXmlException) { @@ -139,7 +139,7 @@ class FeedFetcher implements IFeedFetcher { $msg = $this->l10n->t('Feed not found: either the website ' . 'does not provide a feed or blocks access. To rule out ' . 'blocking, try to download the feed on your server\'s ' . - 'command line using curl: curl http://the-feed.tld'); + 'command line using curl: curl ' . $url); } else if ($ex instanceof UnsupportedFeedFormatException) { $msg = $this->l10n->t('Detected feed format is not supported'); } else if ($ex instanceof InvalidCertificateException) { -- cgit v1.2.3