diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-12 08:52:03 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-06-12 08:52:03 -0700 |
commit | dc6c75cd05b66b030daa9b4088ee69758f71e1e8 (patch) | |
tree | 5b73a590849323f573a93b9f4553fa46ddd83340 /modules/rss/helpers | |
parent | d4d145a44302a1438df7416e3046457bc9582806 (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.
Diffstat (limited to 'modules/rss/helpers')
-rw-r--r-- | modules/rss/helpers/rss.php | 8 |
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 |