forked from GNUsocial/gnu-social
correctly generate enclosure in Activity::asString()
This commit is contained in:
parent
1f0949f9ac
commit
0c0418bdfb
@ -478,7 +478,8 @@ class Activity
|
|||||||
|
|
||||||
foreach ($this->enclosures as $enclosure) {
|
foreach ($this->enclosures as $enclosure) {
|
||||||
if (is_string($enclosure)) {
|
if (is_string($enclosure)) {
|
||||||
$xs->element('link', array('href' => $enclosure));
|
$xs->element('link', array('rel' => 'enclosure',
|
||||||
|
'href' => $enclosure));
|
||||||
} else {
|
} else {
|
||||||
$attributes = array('rel' => 'enclosure',
|
$attributes = array('rel' => 'enclosure',
|
||||||
'href' => $enclosure->url,
|
'href' => $enclosure->url,
|
||||||
@ -487,7 +488,7 @@ class Activity
|
|||||||
if ($enclosure->title) {
|
if ($enclosure->title) {
|
||||||
$attributes['title'] = $enclosure->title;
|
$attributes['title'] = $enclosure->title;
|
||||||
}
|
}
|
||||||
$xs->element('link', array('href' => $enclosure));
|
$xs->element('link', $attributes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user