From 76b89556fc138dce694178fab9140a8242ea40ec Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 14 Jun 2009 12:09:47 -0700 Subject: Remove the sidebar flag from the feed definition returned by available_feeds and replace with a type field with one of two values (head and block). We need to do this to determine what fields go in the rss block so we can ignore the definitions that are related to the page head when creating the rss block that goes into the sidebar. --- modules/rss/helpers/rss.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/rss') diff --git a/modules/rss/helpers/rss.php b/modules/rss/helpers/rss.php index e4d6f5e9..403ee225 100644 --- a/modules/rss/helpers/rss.php +++ b/modules/rss/helpers/rss.php @@ -27,16 +27,15 @@ class rss_Core { /** * Get all available rss feeds */ - static function available_feeds($item, $sidebar_only=true) { + static function available_feeds($item) { $feeds = array(); foreach (module::active() as $module) { $class_name = "{$module->name}_rss"; if (method_exists($class_name, "available_feeds")) { foreach (call_user_func(array($class_name, "available_feeds"), $item) as $feed) { - if ($sidebar_only && !$feed["sidebar"]) { - continue; + if ($feed["type"] == "block") { + $feeds[$feed["description"]] = url::site("rss/feed/{$feed['uri']}"); } - $feeds[$feed["description"]] = url::site("rss/feed/{$feed['uri']}"); } } } -- cgit v1.2.3