From: Evan Prodromou Date: Fri, 13 Aug 2010 18:50:33 +0000 (-0700) Subject: set notice titles in RSS and Atom output X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=96705b4ec5d9fc658a6add47777912bc1362f406;p=quix0rs-gnu-social.git set notice titles in RSS and Atom output --- 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; + } }