From fee5bb37aaf75684e7d5655911167970320a5173 Mon Sep 17 00:00:00 2001 From: Benjamin Brahmer Date: Tue, 31 Dec 2024 19:39:45 +0100 Subject: [PATCH] if title field does not exist look for text Signed-off-by: Benjamin Brahmer --- lib/Utility/OPMLImporter.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Utility/OPMLImporter.php b/lib/Utility/OPMLImporter.php index 0068f3e71..9cc3774fd 100644 --- a/lib/Utility/OPMLImporter.php +++ b/lib/Utility/OPMLImporter.php @@ -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'); $feed = [ 'link' => $outline->getAttribute('htmlUrl'), 'url' => $outline->getAttribute('xmlUrl'), - 'title' => $outline->getAttribute('title'), + 'title' => $title, 'folder' => $parent, ];