diff options
author | Eric Helgeson <erichelgeson@gmail.com> | 2009-07-21 09:20:47 -0500 |
---|---|---|
committer | Eric Helgeson <erichelgeson@gmail.com> | 2009-07-21 09:20:47 -0500 |
commit | db19d61e68fcf8398579c2c4968e73db7f7ed93b (patch) | |
tree | ca64284fb8544823de4a120bca8d45b424fb65b8 /lib/rssaction.php | |
parent | c32e494c0c480e30317b0f0a8dcae7103c4ff89e (diff) | |
parent | fbb0df9f5436e956c43ace372f625f08628c000f (diff) |
Merge commit 'origin/0.8.x' into 0.9.x
Diffstat (limited to 'lib/rssaction.php')
-rw-r--r-- | lib/rssaction.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/rssaction.php b/lib/rssaction.php index ffa1f9e99..901558943 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -39,6 +39,7 @@ class Rss10Action extends Action var $creators = array(); var $limit = DEFAULT_RSS_LIMIT; var $notices = null; + var $tags_already_output = array(); /** * Constructor @@ -234,6 +235,11 @@ class Rss10Action extends Action $replyurl = common_local_url('shownotice', array('notice' => $notice->reply_to)); $this->element('sioc:reply_of', array('rdf:resource' => $replyurl)); } + if (!empty($notice->conversation)) { + $conversationurl = common_local_url('conversation', + array('id' => $notice->conversation)); + $this->element('sioc:has_discussion', array('rdf:resource' => $conversationurl)); + } $attachments = $notice->attachments(); if($attachments){ foreach($attachments as $attachment){ @@ -268,6 +274,12 @@ class Rss10Action extends Action foreach ($tags as $tag) { $tagpage = common_local_url('tag', array('tag' => $tag)); + + if ( in_array($tag, $this->tags_already_output) ) { + $this->element('ctag:tagged', array('rdf:resource'=>$tagpage.'#concept')); + continue; + } + $tagrss = common_local_url('tagrss', array('tag' => $tag)); $this->elementStart('ctag:tagged'); $this->elementStart('ctag:Tag', array('rdf:about'=>$tagpage.'#concept', 'ctag:label'=>$tag)); @@ -275,6 +287,8 @@ class Rss10Action extends Action $this->element('rdfs:seeAlso', array('rdf:resource'=>$tagrss)); $this->elementEnd('ctag:Tag'); $this->elementEnd('ctag:tagged'); + + $this->tags_already_output[] = $tag; } } $this->elementEnd('item'); @@ -320,6 +334,8 @@ class Rss10Action extends Action 'http://rdfs.org/sioc/ns#', 'xmlns:sioct' => 'http://rdfs.org/sioc/types#', + 'xmlns:rdfs' => + 'http://www.w3.org/2000/01/rdf-schema#', 'xmlns:laconica' => 'http://laconi.ca/ont/', 'xmlns' => 'http://purl.org/rss/1.0/')); |