Skip to content

Commit

Permalink
fixup for #1861
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
  • Loading branch information
Grotax committed Aug 19, 2022
1 parent 1784406 commit 5cf26a3
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions lib/Utility/OPMLExporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,14 @@ protected function createFeedOutline(Feed $feed, DOMDocument $document)
{
$feedOutline = $document->createElement('outline');
$attributes = [
['title', $feed->getTitle()],
['text', $feed->getTitle()],
['type', 'rss'],
['xmlUrl', $feed->getUrl()],
['htmlUrl', $feed->getLink()],
'title' => $feed->getTitle(),
'text' => $feed->getTitle(),
'type' => 'rss',
'xmlUrl' => $feed->getUrl(),
'htmlUrl' => $feed->getLink(),
];

foreach ($attributes as $attribute) {
if (is_null($attribute[1])) {
$feedOutline->setAttribute($attribute[0], "");
} else {
$feedOutline->setAttribute($attribute[0], $attribute[1]);
}
foreach ($attributes as $name => $value) {
$feedOutline->setAttribute($name, $value ?? '');
}

return $feedOutline;
Expand Down

0 comments on commit 5cf26a3

Please sign in to comment.