]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
set notice titles in RSS and Atom output
authorEvan Prodromou <evan@status.net>
Fri, 13 Aug 2010 18:50:33 +0000 (11:50 -0700)
committerEvan Prodromou <evan@status.net>
Fri, 13 Aug 2010 18:50:33 +0000 (11:50 -0700)
plugins/NoticeTitle/NoticeTitlePlugin.php

index e8377f5b0b5b0803a02c165010109c9f4620ea3f..c708a9fa0ce452a034b10ee063211fb3ad20d2f2 100644 (file)
@@ -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;
+    }
 }