Feature Request #7

SimplePie_Locator should be able to return all available feeds

Added by Ryan Parman 906 days ago. Updated 405 days ago.

Status:Fixed Start:2008-02-03
Priority:Low Due date:
Assigned to:Ryan McCue % Done:

0%

Category:Autodiscovery
Target version:1.2

Description

From the old Basecamp issue tracker, SimplePie_Locator should be able to return all available feeds. The number of feeds returned is limited by set_max_checked_feeds() <http://simplepie.org/wiki/reference/simplepie/set_max_checked_feeds>

all_discovered_feeds.diff - Keep a list of all feeds found during the autodiscovery process. (2.3 KB) Richard Miller, 2009-06-05 14:53

all_discovered_feeds.diff - Avoid duplicates. (2.6 KB) Ryan McCue, 2009-06-05 20:53

all_discovered_feeds.diff - Now uses isset() to avoid making an unnecessary request (3.3 KB) Ryan McCue, 2009-06-08 23:57

History

Updated by Geoffrey Sneddon 906 days ago

  • Target version set to 1.2

Updated by Geoffrey Sneddon 429 days ago

  • Target version changed from 1.2 to 1.3

Updated by Richard Miller 418 days ago

At FamilyLink.com, we also needed a list of all feeds found during the discovery process. My understanding is that even with max_checked_feeds set to a high number, there's no way to access all the discovered feeds because autodiscovery() returns after finding the first valid feed. Attached is a patch that we used to achieve this functionality.

Updated by Ryan McCue 418 days ago

Though the patch doesn't apply properly, I managed to get it working, however it returns duplicates, as far as I can see.

I've attached a new version of the patch which uses the feed URL as an array key to ensure no duplicates. This patch should also apply cleanly.

Updated by Richard Miller 418 days ago

Ryan, that's odd. I was able to redownload simplepie.inc and the patch and apply it without errors. Good idea to prevent duplicates.

Updated by Ryan McCue 418 days ago

I'm patching against the svn trunk; the fact it didn't have a specified revision may have been a problem.

Updated by Geoffrey Sneddon 418 days ago

  • Assigned to set to Ryan McCue
  • Priority changed from Medium to Low
  • Target version changed from 1.3 to 1.2

I'm bumping this back down to 1.2 because I expect we can get a finished patch done by then. What's the point of the feed URL being the key? Is the value a File object? (I really can't remember, though I think it is.) If it is, we don't want to actually even create that object. So, I would propose you do an isset to check that we haven't already got that URL.

Updated by Richard Miller 416 days ago

Geoffrey, I believe Ryan used the URLs as keys simply to prevent duplicates as the array is populated. Later, the keys are dropped when the array is returned (return array_values($feeds)). The array values are indeed File objects.

Updated by Ryan McCue 415 days ago

Geoffrey, is this what you meant? Let me know, and I'll commit.

Updated by Geoffrey Sneddon 415 days ago

Yes, r+.

Updated by Ryan McCue 405 days ago

  • Status changed from New to Fixed

Applied in changeset r1051.

Also available in: Atom PDF