Skip to content

Commit

Permalink
if title field does not exist look for text
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Brahmer <[email protected]>
  • Loading branch information
Grotax committed Dec 31, 2024
1 parent 812a219 commit fee5bb3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Utility/OPMLImporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ public function import(string $userId, string $data): ?array
private function outlineToItem(DOMElement $outline, ?string $parent = null): void
{
if ($outline->getAttribute('type') === 'rss') {
// take title if available, otherwise use text #2896
$title = $outline->getAttribute('title') ?: $outline->getAttribute('text');

Check failure on line 69 in lib/Utility/OPMLImporter.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable29 with 8.2

Short ternary operator is not allowed. Use null coalesce operator if applicable or consider using long ternary.

Check failure on line 69 in lib/Utility/OPMLImporter.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud stable29 with 8.3

Short ternary operator is not allowed. Use null coalesce operator if applicable or consider using long ternary.

Check failure on line 69 in lib/Utility/OPMLImporter.php

View workflow job for this annotation

GitHub Actions / phpstan: Nextcloud pre-release with 8.3

Short ternary operator is not allowed. Use null coalesce operator if applicable or consider using long ternary.
$feed = [
'link' => $outline->getAttribute('htmlUrl'),
'url' => $outline->getAttribute('xmlUrl'),
'title' => $outline->getAttribute('title'),
'title' => $title,
'folder' => $parent,
];

Expand Down

0 comments on commit fee5bb3

Please sign in to comment.