correctly generate enclosure in Activity::asString()

This commit is contained in:
Evan Prodromou 2010-12-06 15:51:42 -05:00
parent 1f0949f9ac
commit 0c0418bdfb

View File

@ -478,7 +478,8 @@ class Activity
foreach ($this->enclosures as $enclosure) {
if (is_string($enclosure)) {
$xs->element('link', array('href' => $enclosure));
$xs->element('link', array('rel' => 'enclosure',
'href' => $enclosure));
} else {
$attributes = array('rel' => 'enclosure',
'href' => $enclosure->url,
@ -487,7 +488,7 @@ class Activity
if ($enclosure->title) {
$attributes['title'] = $enclosure->title;
}
$xs->element('link', array('href' => $enclosure));
$xs->element('link', $attributes);
}
}