summaryrefslogtreecommitdiff
path: root/modules/rss
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-14 12:09:47 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-14 12:09:47 -0700
commit76b89556fc138dce694178fab9140a8242ea40ec (patch)
tree8a15489a8070aabfe2b19f7b4f5afa790326df82 /modules/rss
parent484796e7cc54c3690462ee061850b563c4d5da16 (diff)
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.
Diffstat (limited to 'modules/rss')
-rw-r--r--modules/rss/helpers/rss.php7
1 files changed, 3 insertions, 4 deletions
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']}");
}
}
}