forked from GNUsocial/gnu-social
Merge branch 'work' into testing
This commit is contained in:
@@ -161,20 +161,20 @@ class XRD
|
||||
function saveLink($doc, $link)
|
||||
{
|
||||
$link_element = $doc->createElement('Link');
|
||||
if ($link['rel']) {
|
||||
if (!empty($link['rel'])) {
|
||||
$link_element->setAttribute('rel', $link['rel']);
|
||||
}
|
||||
if ($link['type']) {
|
||||
if (!empty($link['type'])) {
|
||||
$link_element->setAttribute('type', $link['type']);
|
||||
}
|
||||
if ($link['href']) {
|
||||
if (!empty($link['href'])) {
|
||||
$link_element->setAttribute('href', $link['href']);
|
||||
}
|
||||
if ($link['template']) {
|
||||
if (!empty($link['template'])) {
|
||||
$link_element->setAttribute('template', $link['template']);
|
||||
}
|
||||
|
||||
if (is_array($link['title'])) {
|
||||
if (!empty($link['title']) && is_array($link['title'])) {
|
||||
foreach($link['title'] as $title) {
|
||||
$title = $doc->createElement('Title', $title);
|
||||
$link_element->appendChild($title);
|
||||
|
||||
Reference in New Issue
Block a user