diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-08-26 15:40:51 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-08-26 15:40:51 -0400 |
commit | 6d60d74093005992701418edda5be4422e46262f (patch) | |
tree | 73db603d3b8573a8ef374a21c70c4adae58165a7 /classes/Notice.php | |
parent | d9e8dabaf4c5b38712a3e3ce97b45c5effee4bad (diff) |
Display linked oembed resources as enclosures if they are of non-html mime types
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/classes/Notice.php b/classes/Notice.php index 48d4a0940..c4f163c31 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); } |