From 96705b4ec5d9fc658a6add47777912bc1362f406 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 13 Aug 2010 11:50:33 -0700 Subject: [PATCH] set notice titles in RSS and Atom output --- plugins/NoticeTitle/NoticeTitlePlugin.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/plugins/NoticeTitle/NoticeTitlePlugin.php b/plugins/NoticeTitle/NoticeTitlePlugin.php index e8377f5b0b..c708a9fa0c 100644 --- a/plugins/NoticeTitle/NoticeTitlePlugin.php +++ b/plugins/NoticeTitle/NoticeTitlePlugin.php @@ -162,5 +162,27 @@ class NoticeTitlePlugin extends Plugin return true; } + + function onEndRssEntryArray($notice, &$entry) + { + $title = Notice_title::fromNotice($notice); + + if (!empty($title)) { + $entry['title'] = $title; + } + + return true; + } + + function onStartActivityTitle(&$notice, &$xs, &$output) + { + $title = Notice_title::fromNotice($notice); + + if (!empty($title)) { + $output = $title; + } + + return true; + } } -- 2.39.5