mirror of
https://github.com/chylex/Nextcloud-News.git
synced 2025-05-04 01:34:06 +02:00
parent
1784406fa7
commit
410a1e4d6b
@ -91,19 +91,14 @@ class OPMLExporter
|
|||||||
{
|
{
|
||||||
$feedOutline = $document->createElement('outline');
|
$feedOutline = $document->createElement('outline');
|
||||||
$attributes = [
|
$attributes = [
|
||||||
['title', $feed->getTitle()],
|
'title' => $feed->getTitle(),
|
||||||
['text', $feed->getTitle()],
|
'text' => $feed->getTitle(),
|
||||||
['type', 'rss'],
|
'type' => 'rss',
|
||||||
['xmlUrl', $feed->getUrl()],
|
'xmlUrl' => $feed->getUrl(),
|
||||||
['htmlUrl', $feed->getLink()],
|
'htmlUrl' => $feed->getLink(),
|
||||||
];
|
];
|
||||||
|
foreach ($attributes as $name => $value) {
|
||||||
foreach ($attributes as $attribute) {
|
$feedOutline->setAttribute($name, $value ?? '');
|
||||||
if (is_null($attribute[1])) {
|
|
||||||
$feedOutline->setAttribute($attribute[0], "");
|
|
||||||
} else {
|
|
||||||
$feedOutline->setAttribute($attribute[0], $attribute[1]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $feedOutline;
|
return $feedOutline;
|
||||||
|
Loading…
Reference in New Issue
Block a user