summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-08-27 14:52:32 -0700
committerEvan Prodromou <evan@status.net>2009-08-27 14:52:32 -0700
commita08c76a4342cfb4b3d772f6880ba0b8f3153b246 (patch)
treee2ba9ef2f670d01cf700a732d36050fe3ce63774 /classes/Notice.php
parent522008dee570aafcc844bf123d25203c7d9c3ebc (diff)
parenteb667d09d9c6ef5a1465a5f8d824661a9387a4da (diff)
Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x
Conflicts: classes/laconica.ini
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index ed41acbae..e569d8305 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -1199,10 +1199,11 @@ class Notice extends Memcached_DataObject
$attachments = $this->attachments();
if($attachments){
foreach($attachments as $attachment){
- if ($attachment->isEnclosure()) {
- $attributes = array('rel'=>'enclosure','href'=>$attachment->url,'type'=>$attachment->mimetype,'length'=>$attachment->size);
- if($attachment->title){
- $attributes['title']=$attachment->title;
+ $enclosure=$attachment->getEnclosure();
+ if ($enclosure) {
+ $attributes = array('rel'=>'enclosure','href'=>$enclosure->url,'type'=>$enclosure->mimetype,'length'=>$enclosure->size);
+ if($enclosure->title){
+ $attributes['title']=$enclosure->title;
}
$xs->element('link', $attributes, null);
}