diff options
author | Evan Prodromou <evan@status.net> | 2009-08-27 14:52:32 -0700 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2009-08-27 14:52:32 -0700 |
commit | a08c76a4342cfb4b3d772f6880ba0b8f3153b246 (patch) | |
tree | e2ba9ef2f670d01cf700a732d36050fe3ce63774 /lib/rssaction.php | |
parent | 522008dee570aafcc844bf123d25203c7d9c3ebc (diff) | |
parent | eb667d09d9c6ef5a1465a5f8d824661a9387a4da (diff) |
Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x
Conflicts:
classes/laconica.ini
Diffstat (limited to 'lib/rssaction.php')
-rw-r--r-- | lib/rssaction.php | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/rssaction.php b/lib/rssaction.php index 60611e48d..dd0f1005a 100644 --- a/lib/rssaction.php +++ b/lib/rssaction.php @@ -258,26 +258,27 @@ class Rss10Action extends Action $attachments = $notice->attachments(); if($attachments){ foreach($attachments as $attachment){ - if ($attachment->isEnclosure()) { + $enclosure=$attachment->getEnclosure(); + if ($enclosure) { // DO NOT move xmlns declaration to root element. Making it // the default namespace here improves compatibility with // real-world feed readers. $attribs = array( - 'rdf:resource' => $attachment->url, - 'url' => $attachment->url, + 'rdf:resource' => $enclosure->url, + 'url' => $enclosure->url, 'xmlns' => 'http://purl.oclc.org/net/rss_2.0/enc#' ); - if ($attachment->title) { - $attribs['dc:title'] = $attachment->title; + if ($enclosure->title) { + $attribs['dc:title'] = $enclosure->title; } - if ($attachment->modified) { - $attribs['dc:date'] = common_date_w3dtf($attachment->modified); + if ($enclosure->modified) { + $attribs['dc:date'] = common_date_w3dtf($enclosure->modified); } - if ($attachment->size) { - $attribs['length'] = $attachment->size; + if ($enclosure->size) { + $attribs['length'] = $enclosure->size; } - if ($attachment->mimetype) { - $attribs['type'] = $attachment->mimetype; + if ($enclosure->mimetype) { + $attribs['type'] = $enclosure->mimetype; } $this->element('enclosure', $attribs); } |