From 4bd82c11670cf9c75ed9f9a1da31e0873a46ed9d Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 11 Jun 2009 15:44:34 +0800 Subject: Changed rss_theme::sidebar_blocks to fire the event "request_feed_links" to allow modules to contribute rss feed links to the rss sidebar block. Ticket #388. Signed-off-by: --- modules/comment/helpers/comment_event.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/comment/helpers') diff --git a/modules/comment/helpers/comment_event.php b/modules/comment/helpers/comment_event.php index a3beb27a..6370e27d 100644 --- a/modules/comment/helpers/comment_event.php +++ b/modules/comment/helpers/comment_event.php @@ -21,4 +21,10 @@ class comment_event_Core { static function item_before_delete($item) { Database::instance()->delete("comments", array("item_id" => $item->id)); } + + static function request_feed_links($event_data) { + $event_data->feeds[t("All new comments")] = url::site("rss/comments"); + $event_data->feeds[sprintf(t("Comments on %s"), $event_data->item->title)] = + url::site("rss/comments/{$event_data->item->id}"); + } } -- cgit v1.2.3