Skip to content

Commit

Permalink
remove deprecated code
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Brahmer <[email protected]>
  • Loading branch information
Grotax committed Sep 29, 2024
1 parent ccdf92d commit 008c189
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lib/Fetcher/FeedFetcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class FeedFetcher implements IFeedFetcher
* @var FetcherConfig
*/
private $fetcherConfig;

/**
* @var Cache
*/
Expand Down Expand Up @@ -379,11 +379,11 @@ protected function getFavicon(FeedInterface $feed, string $url): ?string
$favicon = null;
// trim the string because authors do funny things
$feed_logo = $feed->getLogo();

if (!is_null($feed_logo)) {
$favicon = trim($feed_logo);
}

ini_set('user_agent', FetcherConfig::DEFAULT_USER_AGENT);

$base_url = new Net_URL2($url);
Expand Down Expand Up @@ -500,16 +500,12 @@ protected function buildFeed(FeedInterface $feed, string $url, string $location)
$title = strip_tags($this->decodeTwice($feed->getTitle()));
$newFeed->setTitle($title);
}

$newFeed->setUrl($url); // the url used to add the feed
$newFeed->setLocation($location); // the url where the feed was found
$newFeed->setLink($feed->getLink()); // <link> attribute in the feed
if ($feed->getLastModified() instanceof DateTime) {
$newFeed->setHttpLastModified($feed->getLastModified()->format(DateTime::RSS));
}
$newFeed->setAdded($this->time->getTime());



$favicon = $this->getFavicon($feed, $url);
$newFeed->setFaviconLink($favicon);

Expand Down

0 comments on commit 008c189

Please sign in to comment.