summaryrefslogtreecommitdiff
path: root/lib/rssaction.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-07-09 11:28:21 -0700
committerZach Copley <zach@controlyourself.ca>2009-07-09 11:28:21 -0700
commitdb587562756483ec285b274adc073df29d4031ae (patch)
treee4ac812d424e223eb8ce25490262996ae7cb7d9a /lib/rssaction.php
parentc981f5bcec02295482153e45b0d57f37260706c0 (diff)
parent69574591d0ac429475b1099e8d9f3e46f7a004ea (diff)
Merge branch 'candrews-review' into 0.8.x
* candrews-review: Notice attachments are enclosures in feeds (Atom, RSS 1.0/RDF, and RSS 2.0).
Diffstat (limited to 'lib/rssaction.php')
-rw-r--r--lib/rssaction.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/rssaction.php b/lib/rssaction.php
index 0c8188e88..fe3fd6f4a 100644
--- a/lib/rssaction.php
+++ b/lib/rssaction.php
@@ -216,6 +216,13 @@ class Rss10Action extends Action
$replyurl = common_local_url('shownotice', array('notice' => $notice->reply_to));
$this->element('sioc:reply_of', array('rdf:resource' => $replyurl));
}
+ $attachments = $notice->attachments();
+ if($attachments){
+ foreach($attachments as $attachment){
+ $this->element('enc:enclosure', array('rdf:resource'=>$attachment->url,'enc:type'=>$attachment->mimetype,'enc:length'=>$attachment->size), null);
+ }
+ }
+
$this->elementEnd('item');
$this->creators[$creator_uri] = $profile;
}
@@ -251,6 +258,8 @@ class Rss10Action extends Action
'http://creativecommons.org/ns#',
'xmlns:content' =>
'http://purl.org/rss/1.0/modules/content/',
+ 'xmlns:enc' =>
+ 'http://purl.oclc.org/net/rss_2.0/enc#',
'xmlns:foaf' =>
'http://xmlns.com/foaf/0.1/',
'xmlns:sioc' =>