From dc6c75cd05b66b030daa9b4088ee69758f71e1e8 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 12 Jun 2009 08:52:03 -0700 Subject: 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. --- modules/rss/helpers/rss.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'modules/rss/helpers') 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 -- cgit v1.2.3