summaryrefslogtreecommitdiff
path: root/modules/rss/helpers/rss.php
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-12 23:52:03 +0800
committer <unostar@danalan.info>2009-06-13 04:22:26 +0800
commitfd3a81f1ee9b1621f5be62ac4e7f595f7aa83fc0 (patch)
tree6b449e7e8fe50a66f60c5cca49d116e4aeb00b4b /modules/rss/helpers/rss.php
parent94dc6baa4961a178ab68dc4cb0ce7a9bcba0ab26 (diff)
Move the processing of rss feeds from the rss controller to callbacks in the
modules that are supplying the feed. The rss controller becomes a router. In this change the comment and updates fields are distributed. Signed-off-by: <unostar@danalan.info>
Diffstat (limited to 'modules/rss/helpers/rss.php')
-rw-r--r--modules/rss/helpers/rss.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/rss/helpers/rss.php b/modules/rss/helpers/rss.php
index b0e7b30f..1d30425f 100644
--- a/modules/rss/helpers/rss.php
+++ b/modules/rss/helpers/rss.php
@@ -48,4 +48,12 @@ class rss_Core {
return $feeds;
}
+ static function process_feed($feed, $offset, $limit, $id) {
+ foreach (module::active() as $module) {
+ $class_name = "{$module->name}_rss";
+ if (method_exists($class_name, $feed)) {
+ return call_user_func(array($class_name, $feed), $offset, $limit, $id);
+ }
+ }
+ }
} \ No newline at end of file